@chatbotkit/sdk 1.18.3 → 1.19.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/blueprint/index.cjs +3 -0
- package/dist/cjs/blueprint/index.d.ts +8 -7
- package/dist/cjs/blueprint/v1.cjs +12 -7
- package/dist/cjs/blueprint/v1.d.ts +24 -36
- package/dist/cjs/bot/index.d.ts +8 -8
- package/dist/cjs/bot/session/index.d.ts +1 -1
- package/dist/cjs/bot/session/v1.cjs +1 -2
- package/dist/cjs/bot/session/v1.d.ts +5 -9
- package/dist/cjs/bot/v1.cjs +7 -10
- package/dist/cjs/bot/v1.d.ts +30 -54
- package/dist/cjs/buffer.cjs +5 -5
- package/dist/cjs/client.cjs +13 -2
- package/dist/cjs/client.d.ts +6 -6
- package/dist/cjs/contact/conversation/index.d.ts +2 -2
- package/dist/cjs/contact/conversation/v1.cjs +1 -2
- package/dist/cjs/contact/conversation/v1.d.ts +5 -28
- package/dist/cjs/contact/index.d.ts +7 -7
- package/dist/cjs/contact/secret/index.d.ts +5 -5
- package/dist/cjs/contact/secret/v1.cjs +10 -11
- package/dist/cjs/contact/secret/v1.d.ts +20 -40
- package/dist/cjs/contact/task/index.d.ts +2 -2
- package/dist/cjs/contact/task/v1.cjs +1 -2
- package/dist/cjs/contact/task/v1.d.ts +5 -24
- package/dist/cjs/contact/v1.cjs +6 -7
- package/dist/cjs/contact/v1.d.ts +22 -44
- package/dist/cjs/conversation/attachment/index.d.ts +2 -2
- package/dist/cjs/conversation/attachment/v1.cjs +1 -2
- package/dist/cjs/conversation/attachment/v1.d.ts +2 -2
- package/dist/cjs/conversation/index.d.ts +12 -12
- package/dist/cjs/conversation/message/index.d.ts +8 -8
- package/dist/cjs/conversation/message/v1.cjs +7 -10
- package/dist/cjs/conversation/message/v1.d.ts +27 -46
- package/dist/cjs/conversation/session/index.d.ts +1 -1
- package/dist/cjs/conversation/session/v1.cjs +1 -2
- package/dist/cjs/conversation/session/v1.d.ts +5 -8
- package/dist/cjs/conversation/v1.cjs +11 -12
- package/dist/cjs/conversation/v1.d.ts +50 -124
- package/dist/cjs/dataset/file/index.d.ts +5 -5
- package/dist/cjs/dataset/file/v1.cjs +4 -5
- package/dist/cjs/dataset/file/v1.d.ts +17 -26
- package/dist/cjs/dataset/index.d.ts +7 -7
- package/dist/cjs/dataset/record/index.cjs +3 -0
- package/dist/cjs/dataset/record/index.d.ts +7 -6
- package/dist/cjs/dataset/record/v1.cjs +11 -6
- package/dist/cjs/dataset/record/v1.d.ts +26 -34
- package/dist/cjs/dataset/v1.cjs +6 -7
- package/dist/cjs/dataset/v1.d.ts +22 -50
- package/dist/cjs/file/index.cjs +3 -0
- package/dist/cjs/file/index.d.ts +9 -8
- package/dist/cjs/file/v1.cjs +15 -8
- package/dist/cjs/file/v1.d.ts +26 -36
- package/dist/cjs/graphql/index.d.ts +1 -1
- package/dist/cjs/graphql/v1.cjs +4 -5
- package/dist/cjs/graphql/v1.d.ts +7 -18
- package/dist/cjs/index.cjs +27 -15
- package/dist/cjs/index.d.ts +11 -3
- package/dist/cjs/integration/discord/index.d.ts +7 -7
- package/dist/cjs/integration/discord/v1.cjs +6 -10
- package/dist/cjs/integration/discord/v1.d.ts +22 -58
- package/dist/cjs/integration/email/index.d.ts +7 -7
- package/dist/cjs/integration/email/v1.cjs +6 -10
- package/dist/cjs/integration/email/v1.d.ts +22 -54
- package/dist/cjs/integration/extract/index.d.ts +6 -6
- package/dist/cjs/integration/extract/v1.cjs +5 -6
- package/dist/cjs/integration/extract/v1.d.ts +18 -39
- package/dist/cjs/integration/index.cjs +22 -18
- package/dist/cjs/integration/index.d.ts +4 -0
- package/dist/cjs/integration/mcpserver/index.cjs +27 -0
- package/dist/cjs/integration/mcpserver/index.d.ts +10 -0
- package/dist/cjs/integration/mcpserver/v1.cjs +42 -0
- package/dist/cjs/integration/mcpserver/v1.d.ts +28 -0
- package/dist/cjs/integration/messenger/index.d.ts +7 -7
- package/dist/cjs/integration/messenger/v1.cjs +6 -10
- package/dist/cjs/integration/messenger/v1.d.ts +22 -57
- package/dist/cjs/integration/notion/index.d.ts +7 -7
- package/dist/cjs/integration/notion/v1.cjs +6 -7
- package/dist/cjs/integration/notion/v1.d.ts +22 -42
- package/dist/cjs/integration/sitemap/index.d.ts +7 -7
- package/dist/cjs/integration/sitemap/v1.cjs +6 -7
- package/dist/cjs/integration/sitemap/v1.d.ts +22 -45
- package/dist/cjs/integration/slack/index.d.ts +7 -7
- package/dist/cjs/integration/slack/v1.cjs +6 -10
- package/dist/cjs/integration/slack/v1.d.ts +22 -57
- package/dist/cjs/integration/support/index.d.ts +6 -6
- package/dist/cjs/integration/support/v1.cjs +5 -6
- package/dist/cjs/integration/support/v1.d.ts +18 -39
- package/dist/cjs/integration/telegram/index.d.ts +7 -7
- package/dist/cjs/integration/telegram/v1.cjs +6 -10
- package/dist/cjs/integration/telegram/v1.d.ts +22 -56
- package/dist/cjs/integration/trigger/index.d.ts +8 -8
- package/dist/cjs/integration/trigger/v1.cjs +7 -11
- package/dist/cjs/integration/trigger/v1.d.ts +26 -59
- package/dist/cjs/integration/twilio/index.cjs +30 -0
- package/dist/cjs/integration/twilio/index.d.ts +11 -0
- package/dist/cjs/integration/twilio/v1.cjs +50 -0
- package/dist/cjs/integration/twilio/v1.d.ts +33 -0
- package/dist/cjs/integration/whatsapp/index.d.ts +7 -7
- package/dist/cjs/integration/whatsapp/v1.cjs +6 -10
- package/dist/cjs/integration/whatsapp/v1.d.ts +22 -58
- package/dist/cjs/integration/widget/index.cjs +3 -0
- package/dist/cjs/integration/widget/index.d.ts +7 -6
- package/dist/cjs/integration/widget/v1.cjs +14 -6
- package/dist/cjs/integration/widget/v1.d.ts +23 -56
- package/dist/cjs/magic/index.d.ts +15 -2
- package/dist/cjs/magic/v1.cjs +1 -2
- package/dist/cjs/magic/v1.d.ts +4 -13
- package/dist/cjs/memory/index.cjs +33 -0
- package/dist/cjs/memory/index.d.ts +12 -0
- package/dist/cjs/memory/v1.cjs +58 -0
- package/dist/cjs/memory/v1.d.ts +46 -0
- package/dist/cjs/model/v1.cjs +1 -2
- package/dist/cjs/model/v1.d.ts +1 -1
- package/dist/cjs/param.cjs +1 -2
- package/dist/cjs/partner/user/index.d.ts +6 -6
- package/dist/cjs/partner/user/token/index.d.ts +4 -4
- package/dist/cjs/partner/user/token/v1.cjs +3 -4
- package/dist/cjs/partner/user/token/v1.d.ts +13 -26
- package/dist/cjs/partner/user/v1.cjs +5 -6
- package/dist/cjs/partner/user/v1.d.ts +18 -34
- package/dist/cjs/platform/ability/index.d.ts +2 -2
- package/dist/cjs/platform/ability/v1.cjs +1 -2
- package/dist/cjs/platform/ability/v1.d.ts +6 -21
- package/dist/cjs/platform/action/index.cjs +15 -0
- package/dist/cjs/platform/action/index.d.ts +6 -0
- package/dist/cjs/platform/action/v1.cjs +8 -0
- package/dist/cjs/platform/action/v1.d.ts +12 -0
- package/dist/cjs/platform/example/index.cjs +21 -0
- package/dist/cjs/platform/example/index.d.ts +8 -0
- package/dist/cjs/platform/example/v1.cjs +26 -0
- package/dist/cjs/platform/example/v1.d.ts +21 -0
- package/dist/cjs/platform/index.cjs +8 -4
- package/dist/cjs/platform/index.d.ts +5 -1
- package/dist/cjs/platform/model/index.d.ts +2 -2
- package/dist/cjs/platform/model/v1.cjs +1 -2
- package/dist/cjs/platform/model/v1.d.ts +6 -21
- package/dist/cjs/platform/secret/index.d.ts +2 -2
- package/dist/cjs/platform/secret/v1.cjs +1 -2
- package/dist/cjs/platform/secret/v1.d.ts +6 -22
- package/dist/cjs/policy/index.cjs +27 -0
- package/dist/cjs/policy/index.d.ts +10 -0
- package/dist/cjs/policy/v1.cjs +42 -0
- package/dist/cjs/policy/v1.d.ts +28 -0
- package/dist/cjs/secret/index.cjs +9 -0
- package/dist/cjs/secret/index.d.ts +9 -6
- package/dist/cjs/secret/v1.cjs +29 -6
- package/dist/cjs/secret/v1.d.ts +33 -36
- package/dist/cjs/skillset/ability/index.cjs +3 -0
- package/dist/cjs/skillset/ability/index.d.ts +7 -6
- package/dist/cjs/skillset/ability/v1.cjs +11 -6
- package/dist/cjs/skillset/ability/v1.d.ts +26 -34
- package/dist/cjs/skillset/index.d.ts +6 -6
- package/dist/cjs/skillset/v1.cjs +5 -6
- package/dist/cjs/skillset/v1.d.ts +18 -34
- package/dist/cjs/task/index.cjs +6 -0
- package/dist/cjs/task/index.d.ts +8 -6
- package/dist/cjs/task/v1.cjs +21 -6
- package/dist/cjs/task/v1.d.ts +29 -35
- package/dist/cjs/team/index.cjs +15 -0
- package/dist/cjs/team/index.d.ts +6 -0
- package/dist/cjs/team/v1.cjs +8 -0
- package/dist/cjs/team/v1.d.ts +11 -0
- package/dist/cjs/usage/index.d.ts +2 -2
- package/dist/cjs/usage/series/index.d.ts +2 -2
- package/dist/cjs/usage/series/v1.cjs +2 -3
- package/dist/cjs/usage/series/v1.d.ts +3 -18
- package/dist/cjs/usage/v1.cjs +1 -2
- package/dist/cjs/usage/v1.d.ts +3 -17
- package/dist/esm/blueprint/index.d.ts +8 -7
- package/dist/esm/blueprint/index.js +4 -1
- package/dist/esm/blueprint/v1.d.ts +25 -37
- package/dist/esm/blueprint/v1.js +5 -0
- package/dist/esm/bot/index.d.ts +8 -8
- package/dist/esm/bot/session/index.d.ts +1 -1
- package/dist/esm/bot/session/v1.d.ts +5 -9
- package/dist/esm/bot/v1.d.ts +31 -55
- package/dist/esm/bot/v1.js +0 -2
- package/dist/esm/buffer.js +4 -3
- package/dist/esm/client.d.ts +35 -35
- package/dist/esm/client.js +13 -2
- package/dist/esm/contact/conversation/index.d.ts +2 -2
- package/dist/esm/contact/conversation/v1.d.ts +6 -29
- package/dist/esm/contact/index.d.ts +7 -7
- package/dist/esm/contact/secret/index.d.ts +5 -5
- package/dist/esm/contact/secret/v1.d.ts +21 -41
- package/dist/esm/contact/secret/v1.js +6 -6
- package/dist/esm/contact/task/index.d.ts +2 -2
- package/dist/esm/contact/task/v1.d.ts +6 -25
- package/dist/esm/contact/v1.d.ts +23 -45
- package/dist/esm/conversation/attachment/index.d.ts +2 -2
- package/dist/esm/conversation/attachment/v1.d.ts +2 -2
- package/dist/esm/conversation/index.d.ts +12 -12
- package/dist/esm/conversation/message/index.d.ts +8 -8
- package/dist/esm/conversation/message/v1.d.ts +28 -47
- package/dist/esm/conversation/message/v1.js +0 -2
- package/dist/esm/conversation/session/index.d.ts +1 -1
- package/dist/esm/conversation/session/v1.d.ts +5 -8
- package/dist/esm/conversation/v1.d.ts +51 -125
- package/dist/esm/dataset/file/index.d.ts +5 -5
- package/dist/esm/dataset/file/v1.d.ts +18 -27
- package/dist/esm/dataset/index.d.ts +7 -7
- package/dist/esm/dataset/record/index.d.ts +7 -6
- package/dist/esm/dataset/record/index.js +4 -1
- package/dist/esm/dataset/record/v1.d.ts +27 -35
- package/dist/esm/dataset/record/v1.js +5 -0
- package/dist/esm/dataset/v1.d.ts +23 -51
- package/dist/esm/file/index.d.ts +9 -8
- package/dist/esm/file/index.js +4 -1
- package/dist/esm/file/v1.d.ts +27 -37
- package/dist/esm/file/v1.js +7 -0
- package/dist/esm/graphql/index.d.ts +1 -1
- package/dist/esm/graphql/v1.d.ts +7 -18
- package/dist/esm/graphql/v1.js +3 -3
- package/dist/esm/index.d.ts +11 -3
- package/dist/esm/index.js +14 -2
- package/dist/esm/integration/discord/index.d.ts +7 -7
- package/dist/esm/integration/discord/v1.d.ts +23 -59
- package/dist/esm/integration/discord/v1.js +0 -3
- package/dist/esm/integration/email/index.d.ts +7 -7
- package/dist/esm/integration/email/v1.d.ts +23 -55
- package/dist/esm/integration/email/v1.js +0 -3
- package/dist/esm/integration/extract/index.d.ts +6 -6
- package/dist/esm/integration/extract/v1.d.ts +19 -40
- package/dist/esm/integration/index.d.ts +4 -0
- package/dist/esm/integration/index.js +4 -0
- package/dist/esm/integration/mcpserver/index.d.ts +10 -0
- package/dist/esm/integration/mcpserver/index.js +23 -0
- package/dist/esm/integration/mcpserver/v1.d.ts +28 -0
- package/dist/esm/integration/mcpserver/v1.js +35 -0
- package/dist/esm/integration/messenger/index.d.ts +7 -7
- package/dist/esm/integration/messenger/v1.d.ts +23 -58
- package/dist/esm/integration/messenger/v1.js +0 -3
- package/dist/esm/integration/notion/index.d.ts +7 -7
- package/dist/esm/integration/notion/v1.d.ts +23 -43
- package/dist/esm/integration/sitemap/index.d.ts +7 -7
- package/dist/esm/integration/sitemap/v1.d.ts +23 -46
- package/dist/esm/integration/slack/index.d.ts +7 -7
- package/dist/esm/integration/slack/v1.d.ts +23 -58
- package/dist/esm/integration/slack/v1.js +0 -3
- package/dist/esm/integration/support/index.d.ts +6 -6
- package/dist/esm/integration/support/v1.d.ts +19 -40
- package/dist/esm/integration/telegram/index.d.ts +7 -7
- package/dist/esm/integration/telegram/v1.d.ts +23 -57
- package/dist/esm/integration/telegram/v1.js +0 -3
- package/dist/esm/integration/trigger/index.d.ts +8 -8
- package/dist/esm/integration/trigger/v1.d.ts +27 -60
- package/dist/esm/integration/trigger/v1.js +0 -3
- package/dist/esm/integration/twilio/index.d.ts +11 -0
- package/dist/esm/integration/twilio/index.js +26 -0
- package/dist/esm/integration/twilio/v1.d.ts +33 -0
- package/dist/esm/integration/twilio/v1.js +42 -0
- package/dist/esm/integration/whatsapp/index.d.ts +7 -7
- package/dist/esm/integration/whatsapp/v1.d.ts +23 -59
- package/dist/esm/integration/whatsapp/v1.js +0 -3
- package/dist/esm/integration/widget/index.d.ts +7 -6
- package/dist/esm/integration/widget/index.js +4 -1
- package/dist/esm/integration/widget/v1.d.ts +24 -57
- package/dist/esm/integration/widget/v1.js +8 -0
- package/dist/esm/magic/index.d.ts +15 -2
- package/dist/esm/magic/v1.d.ts +4 -13
- package/dist/esm/memory/index.d.ts +12 -0
- package/dist/esm/memory/index.js +29 -0
- package/dist/esm/memory/v1.d.ts +46 -0
- package/dist/esm/memory/v1.js +49 -0
- package/dist/esm/model/v1.d.ts +1 -1
- package/dist/esm/param.d.ts +1 -1
- package/dist/esm/partner/user/index.d.ts +6 -6
- package/dist/esm/partner/user/token/index.d.ts +4 -4
- package/dist/esm/partner/user/token/v1.d.ts +14 -27
- package/dist/esm/partner/user/v1.d.ts +19 -35
- package/dist/esm/platform/ability/index.d.ts +2 -2
- package/dist/esm/platform/ability/v1.d.ts +7 -22
- package/dist/esm/platform/action/index.d.ts +6 -0
- package/dist/esm/platform/action/index.js +11 -0
- package/dist/esm/platform/action/v1.d.ts +12 -0
- package/dist/esm/platform/action/v1.js +5 -0
- package/dist/esm/platform/example/index.d.ts +8 -0
- package/dist/esm/platform/example/index.js +17 -0
- package/dist/esm/platform/example/v1.d.ts +21 -0
- package/dist/esm/platform/example/v1.js +21 -0
- package/dist/esm/platform/index.d.ts +5 -1
- package/dist/esm/platform/index.js +5 -1
- package/dist/esm/platform/model/index.d.ts +2 -2
- package/dist/esm/platform/model/v1.d.ts +7 -22
- package/dist/esm/platform/secret/index.d.ts +2 -2
- package/dist/esm/platform/secret/v1.d.ts +7 -23
- package/dist/esm/policy/index.d.ts +10 -0
- package/dist/esm/policy/index.js +23 -0
- package/dist/esm/policy/v1.d.ts +28 -0
- package/dist/esm/policy/v1.js +35 -0
- package/dist/esm/secret/index.d.ts +9 -6
- package/dist/esm/secret/index.js +10 -1
- package/dist/esm/secret/v1.d.ts +34 -37
- package/dist/esm/secret/v1.js +21 -0
- package/dist/esm/skillset/ability/index.d.ts +7 -6
- package/dist/esm/skillset/ability/index.js +4 -1
- package/dist/esm/skillset/ability/v1.d.ts +27 -35
- package/dist/esm/skillset/ability/v1.js +5 -0
- package/dist/esm/skillset/index.d.ts +6 -6
- package/dist/esm/skillset/v1.d.ts +19 -35
- package/dist/esm/task/index.d.ts +8 -6
- package/dist/esm/task/index.js +7 -1
- package/dist/esm/task/v1.d.ts +30 -36
- package/dist/esm/task/v1.js +14 -0
- package/dist/esm/team/index.d.ts +6 -0
- package/dist/esm/team/index.js +11 -0
- package/dist/esm/team/v1.d.ts +11 -0
- package/dist/esm/team/v1.js +5 -0
- package/dist/esm/usage/index.d.ts +2 -2
- package/dist/esm/usage/series/index.d.ts +2 -2
- package/dist/esm/usage/series/v1.d.ts +3 -18
- package/dist/esm/usage/series/v1.js +1 -1
- package/dist/esm/usage/v1.d.ts +3 -17
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +365 -7
|
@@ -25,6 +25,9 @@ class BlueprintClient extends client_js_1.ChatBotKitClient {
|
|
|
25
25
|
clone(blueprintId) {
|
|
26
26
|
return (0, v1_js_1.cloneBlueprint)(this, blueprintId);
|
|
27
27
|
}
|
|
28
|
+
listResources(blueprintId) {
|
|
29
|
+
return (0, v1_js_1.listBlueprintResources)(this, blueprintId);
|
|
30
|
+
}
|
|
28
31
|
}
|
|
29
32
|
exports.BlueprintClient = BlueprintClient;
|
|
30
33
|
exports.default = BlueprintClient;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export class BlueprintClient extends ChatBotKitClient {
|
|
2
|
-
list(request?: import(
|
|
3
|
-
fetch(blueprintId: string): ResponsePromise<import(
|
|
4
|
-
create(request: import(
|
|
5
|
-
update(blueprintId: string, request: import(
|
|
6
|
-
delete(blueprintId: string): Promise<import(
|
|
7
|
-
clone(blueprintId: string): Promise<import(
|
|
2
|
+
list(request?: import("./v1.js").BlueprintListRequest): ResponsePromise<import("./v1.js").BlueprintListResponse, import("./v1.js").BlueprintListStreamType>;
|
|
3
|
+
fetch(blueprintId: string): ResponsePromise<import("./v1.js").BlueprintFetchResponse, never>;
|
|
4
|
+
create(request: import("./v1.js").BlueprintCreateRequest): Promise<import("./v1.js").BlueprintCreateResponse>;
|
|
5
|
+
update(blueprintId: string, request: import("./v1.js").BlueprintUpdateRequest): Promise<import("./v1.js").BlueprintUpdateResponse>;
|
|
6
|
+
delete(blueprintId: string): Promise<import("./v1.js").BlueprintDeleteResponse>;
|
|
7
|
+
clone(blueprintId: string): Promise<import("./v1.js").BlueprintCloneResponse>;
|
|
8
|
+
listResources(blueprintId: string): Promise<import("./v1.js").BlueprintListResourcesResponse>;
|
|
8
9
|
}
|
|
9
10
|
export default BlueprintClient;
|
|
10
|
-
export type ResponsePromise<T, U> = import(
|
|
11
|
+
export type ResponsePromise<T, U> = import("../client.js").ResponsePromise<T, U>;
|
|
11
12
|
import { ChatBotKitClient } from '../client.cjs';
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.listBlueprints = listBlueprints;
|
|
4
|
+
exports.fetchBlueprint = fetchBlueprint;
|
|
5
|
+
exports.createBlueprint = createBlueprint;
|
|
6
|
+
exports.updateBlueprint = updateBlueprint;
|
|
7
|
+
exports.deleteBlueprint = deleteBlueprint;
|
|
8
|
+
exports.cloneBlueprint = cloneBlueprint;
|
|
9
|
+
exports.listBlueprintResources = listBlueprintResources;
|
|
4
10
|
function listBlueprints(client, request) {
|
|
5
11
|
let url = `/api/v1/blueprint/list`;
|
|
6
12
|
const response = client.clientFetch(url, { query: request });
|
|
7
13
|
return response;
|
|
8
14
|
}
|
|
9
|
-
exports.listBlueprints = listBlueprints;
|
|
10
15
|
function fetchBlueprint(client, blueprintId) {
|
|
11
16
|
const url = `/api/v1/blueprint/${blueprintId}/fetch`;
|
|
12
17
|
const response = client.clientFetch(url);
|
|
13
18
|
return response;
|
|
14
19
|
}
|
|
15
|
-
exports.fetchBlueprint = fetchBlueprint;
|
|
16
20
|
async function createBlueprint(client, request) {
|
|
17
21
|
const url = `/api/v1/blueprint/create`;
|
|
18
22
|
const response = await client.clientFetch(url, {
|
|
@@ -22,7 +26,6 @@ async function createBlueprint(client, request) {
|
|
|
22
26
|
});
|
|
23
27
|
return response;
|
|
24
28
|
}
|
|
25
|
-
exports.createBlueprint = createBlueprint;
|
|
26
29
|
async function updateBlueprint(client, blueprintId, request) {
|
|
27
30
|
const url = `/api/v1/blueprint/${blueprintId}/update`;
|
|
28
31
|
const response = await client.clientFetch(url, {
|
|
@@ -32,7 +35,6 @@ async function updateBlueprint(client, blueprintId, request) {
|
|
|
32
35
|
});
|
|
33
36
|
return response;
|
|
34
37
|
}
|
|
35
|
-
exports.updateBlueprint = updateBlueprint;
|
|
36
38
|
async function deleteBlueprint(client, blueprintId) {
|
|
37
39
|
const url = `/api/v1/blueprint/${blueprintId}/delete`;
|
|
38
40
|
const response = await client.clientFetch(url, {
|
|
@@ -40,7 +42,6 @@ async function deleteBlueprint(client, blueprintId) {
|
|
|
40
42
|
});
|
|
41
43
|
return response;
|
|
42
44
|
}
|
|
43
|
-
exports.deleteBlueprint = deleteBlueprint;
|
|
44
45
|
async function cloneBlueprint(client, blueprintId) {
|
|
45
46
|
const url = `/api/v1/blueprint/${blueprintId}/clone`;
|
|
46
47
|
const response = await client.clientFetch(url, {
|
|
@@ -48,4 +49,8 @@ async function cloneBlueprint(client, blueprintId) {
|
|
|
48
49
|
});
|
|
49
50
|
return response;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
async function listBlueprintResources(client, blueprintId) {
|
|
53
|
+
const url = `/api/v1/blueprint/${blueprintId}/resource/list`;
|
|
54
|
+
const response = await client.clientFetch(url);
|
|
55
|
+
return response;
|
|
56
|
+
}
|
|
@@ -4,44 +4,32 @@ export function createBlueprint(client: ChatBotKitClient, request: BlueprintCrea
|
|
|
4
4
|
export function updateBlueprint(client: ChatBotKitClient, blueprintId: string, request: BlueprintUpdateRequest): Promise<BlueprintUpdateResponse>;
|
|
5
5
|
export function deleteBlueprint(client: ChatBotKitClient, blueprintId: string): Promise<BlueprintDeleteResponse>;
|
|
6
6
|
export function cloneBlueprint(client: ChatBotKitClient, blueprintId: string): Promise<BlueprintCloneResponse>;
|
|
7
|
-
export
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
name?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
meta?: Record<string, any>;
|
|
13
|
-
};
|
|
14
|
-
export type BlueprintInstance = BlueprintOptions & {
|
|
15
|
-
id: string;
|
|
16
|
-
createdAt: number;
|
|
17
|
-
updatedAt: number;
|
|
18
|
-
};
|
|
7
|
+
export function listBlueprintResources(client: ChatBotKitClient, blueprintId: string): Promise<BlueprintListResourcesResponse>;
|
|
8
|
+
export type ChatBotKitClient = import("../client.js").ChatBotKitClient;
|
|
9
|
+
export type ResponsePromise<T, U> = import("../client.js").ResponsePromise<T, U>;
|
|
19
10
|
export type BlueprintListRequest = {
|
|
20
11
|
cursor?: string;
|
|
21
|
-
order?:
|
|
12
|
+
order?: "desc" | "asc";
|
|
22
13
|
take?: number;
|
|
23
14
|
meta?: Record<string, string>;
|
|
24
15
|
};
|
|
25
|
-
export type BlueprintListResponse =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export type
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export type
|
|
33
|
-
export type
|
|
34
|
-
export type
|
|
35
|
-
export type
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export type
|
|
39
|
-
export type
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export type
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export type BlueprintCloneResponse = {
|
|
46
|
-
id: string;
|
|
47
|
-
};
|
|
16
|
+
export type BlueprintListResponse = import("../types/api/v1.js").operations["listBlueprints"]["responses"]["200"]["content"]["application/json"];
|
|
17
|
+
export type BlueprintListStreamType = import("../types/api/v1.js").operations["listBlueprints"]["responses"]["200"]["content"]["application/jsonl"];
|
|
18
|
+
export type BlueprintFetchResponse = import("../types/api/v1.js").operations["fetchBlueprint"]["responses"]["200"]["content"]["application/json"];
|
|
19
|
+
export type BlueprintCreateRequestBody = import("../types/api/v1.js").operations["createBlueprint"]["requestBody"]["content"]["application/json"];
|
|
20
|
+
export type BlueprintCreateRequest = BlueprintCreateRequestBody;
|
|
21
|
+
export type BlueprintCreateResponseBody = import("../types/api/v1.js").operations["createBlueprint"]["responses"]["200"]["content"]["application/json"];
|
|
22
|
+
export type BlueprintCreateResponse = BlueprintCreateResponseBody;
|
|
23
|
+
export type BlueprintUpdateRequestBody = import("../types/api/v1.js").operations["updateBlueprint"]["requestBody"]["content"]["application/json"];
|
|
24
|
+
export type BlueprintUpdateRequest = BlueprintUpdateRequestBody;
|
|
25
|
+
export type BlueprintUpdateResponseBody = import("../types/api/v1.js").operations["updateBlueprint"]["responses"]["200"]["content"]["application/json"];
|
|
26
|
+
export type BlueprintUpdateResponse = BlueprintUpdateResponseBody;
|
|
27
|
+
export type BlueprintDeleteRequestBody = import("../types/api/v1.js").operations["deleteBlueprint"]["requestBody"]["content"]["application/json"];
|
|
28
|
+
export type BlueprintDeleteRequest = BlueprintDeleteRequestBody;
|
|
29
|
+
export type BlueprintDeleteResponseBody = import("../types/api/v1.js").operations["deleteBlueprint"]["responses"]["200"]["content"]["application/json"];
|
|
30
|
+
export type BlueprintDeleteResponse = BlueprintDeleteResponseBody;
|
|
31
|
+
export type BlueprintCloneRequestBody = import("../types/api/v1.js").operations["cloneBlueprint"]["requestBody"]["content"]["application/json"];
|
|
32
|
+
export type BlueprintCloneRequest = BlueprintCloneRequestBody;
|
|
33
|
+
export type BlueprintCloneResponseBody = import("../types/api/v1.js").operations["cloneBlueprint"]["responses"]["200"]["content"]["application/json"];
|
|
34
|
+
export type BlueprintCloneResponse = BlueprintCloneResponseBody;
|
|
35
|
+
export type BlueprintListResourcesResponse = import("../types/api/v1.js").operations["listBlueprintResources"]["responses"]["200"]["content"]["application/json"];
|
package/dist/cjs/bot/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export class BotClient extends ChatBotKitClient {
|
|
2
2
|
session: BotSessionClient;
|
|
3
|
-
list(request?: import(
|
|
4
|
-
fetch(botId: string): ResponsePromise<import(
|
|
5
|
-
create(request: import(
|
|
6
|
-
update(botId: string, request: import(
|
|
7
|
-
delete(botId: string): Promise<import(
|
|
8
|
-
upvote(botId: string, request: import(
|
|
9
|
-
downvote(botId: string, request: import(
|
|
3
|
+
list(request?: import("./v1.js").BotListRequest): ResponsePromise<import("./v1.js").BotListResponse, import("./v1.js").BotListStreamType>;
|
|
4
|
+
fetch(botId: string): ResponsePromise<import("./v1.js").BotFetchResponse, never>;
|
|
5
|
+
create(request: import("./v1.js").BotCreateRequest): Promise<import("./v1.js").BotCreateResponse>;
|
|
6
|
+
update(botId: string, request: import("./v1.js").BotUpdateRequest): Promise<import("./v1.js").BotUpdateResponse>;
|
|
7
|
+
delete(botId: string): Promise<import("./v1.js").BotDeleteResponse>;
|
|
8
|
+
upvote(botId: string, request: import("./v1.js").BotUpvoteRequest): Promise<import("./v1.js").BotUpvoteResponse>;
|
|
9
|
+
downvote(botId: string, request: import("./v1.js").BotDownvoteRequest): Promise<import("./v1.js").BotDownvoteResponse>;
|
|
10
10
|
}
|
|
11
11
|
export default BotClient;
|
|
12
|
-
export type ResponsePromise<T, U> = import(
|
|
12
|
+
export type ResponsePromise<T, U> = import("../client.js").ResponsePromise<T, U>;
|
|
13
13
|
import { ChatBotKitClient } from '../client.cjs';
|
|
14
14
|
import { BotSessionClient } from './session/index.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export class BotSessionClient extends ChatBotKitClient {
|
|
2
|
-
create(botId: string, request: import(
|
|
2
|
+
create(botId: string, request: import("./v1.js").BotSessionCreateRequest): Promise<import("./v1.js").BotSessionCreateResponse>;
|
|
3
3
|
}
|
|
4
4
|
import { ChatBotKitClient } from '../../client.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createBotSession =
|
|
3
|
+
exports.createBotSession = createBotSession;
|
|
4
4
|
async function createBotSession(client, botId, request) {
|
|
5
5
|
const url = `/api/v1/bot/${botId}/session/create`;
|
|
6
6
|
const response = await client.clientFetch(url, {
|
|
@@ -10,4 +10,3 @@ async function createBotSession(client, botId, request) {
|
|
|
10
10
|
});
|
|
11
11
|
return response;
|
|
12
12
|
}
|
|
13
|
-
exports.createBotSession = createBotSession;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export function createBotSession(client: ChatBotKitClient, botId: string, request: BotSessionCreateRequest): Promise<BotSessionCreateResponse>;
|
|
2
|
-
export type ChatBotKitClient = import(
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type BotSessionCreateResponse =
|
|
7
|
-
conversationId: string;
|
|
8
|
-
token: string;
|
|
9
|
-
expiresAt: number;
|
|
10
|
-
};
|
|
2
|
+
export type ChatBotKitClient = import("../../client.js").ChatBotKitClient;
|
|
3
|
+
export type BotSessionCreateRequestBody = import("../../types/api/v1.js").operations["createBotSession"]["requestBody"]["content"]["application/json"];
|
|
4
|
+
export type BotSessionCreateRequest = BotSessionCreateRequestBody;
|
|
5
|
+
export type BotSessionCreateResponseBody = import("../../types/api/v1.js").operations["createBotSession"]["responses"]["200"]["content"]["application/json"];
|
|
6
|
+
export type BotSessionCreateResponse = BotSessionCreateResponseBody;
|
package/dist/cjs/bot/v1.cjs
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.listBots = listBots;
|
|
4
|
+
exports.fetchBot = fetchBot;
|
|
5
|
+
exports.createBot = createBot;
|
|
6
|
+
exports.updateBot = updateBot;
|
|
7
|
+
exports.deleteBot = deleteBot;
|
|
8
|
+
exports.upvoteBot = upvoteBot;
|
|
9
|
+
exports.downvoteBot = downvoteBot;
|
|
4
10
|
const v1_js_1 = require("../model/v1.cjs");
|
|
5
11
|
function listBots(client, request) {
|
|
6
12
|
let url = `/api/v1/bot/list`;
|
|
7
13
|
const response = client.clientFetch(url, { query: request });
|
|
8
14
|
return response;
|
|
9
15
|
}
|
|
10
|
-
exports.listBots = listBots;
|
|
11
16
|
function fetchBot(client, botId) {
|
|
12
17
|
const url = `/api/v1/bot/${botId}/fetch`;
|
|
13
18
|
const response = client.clientFetch(url);
|
|
14
19
|
return response;
|
|
15
20
|
}
|
|
16
|
-
exports.fetchBot = fetchBot;
|
|
17
21
|
async function createBot(client, request) {
|
|
18
22
|
const url = `/api/v1/bot/create`;
|
|
19
23
|
const response = await client.clientFetch(url, {
|
|
@@ -24,7 +28,6 @@ async function createBot(client, request) {
|
|
|
24
28
|
});
|
|
25
29
|
return response;
|
|
26
30
|
}
|
|
27
|
-
exports.createBot = createBot;
|
|
28
31
|
async function updateBot(client, botId, request) {
|
|
29
32
|
const url = `/api/v1/bot/${botId}/update`;
|
|
30
33
|
const response = await client.clientFetch(url, {
|
|
@@ -35,7 +38,6 @@ async function updateBot(client, botId, request) {
|
|
|
35
38
|
});
|
|
36
39
|
return response;
|
|
37
40
|
}
|
|
38
|
-
exports.updateBot = updateBot;
|
|
39
41
|
async function deleteBot(client, botId) {
|
|
40
42
|
const url = `/api/v1/bot/${botId}/delete`;
|
|
41
43
|
const response = await client.clientFetch(url, {
|
|
@@ -43,26 +45,21 @@ async function deleteBot(client, botId) {
|
|
|
43
45
|
});
|
|
44
46
|
return response;
|
|
45
47
|
}
|
|
46
|
-
exports.deleteBot = deleteBot;
|
|
47
48
|
async function upvoteBot(client, botId, request) {
|
|
48
49
|
const url = `/api/v1/bot/${botId}/upvote`;
|
|
49
50
|
const response = await client.clientFetch(url, {
|
|
50
51
|
record: {
|
|
51
|
-
value: 100,
|
|
52
52
|
...request,
|
|
53
53
|
},
|
|
54
54
|
});
|
|
55
55
|
return response;
|
|
56
56
|
}
|
|
57
|
-
exports.upvoteBot = upvoteBot;
|
|
58
57
|
async function downvoteBot(client, botId, request) {
|
|
59
58
|
const url = `/api/v1/bot/${botId}/downvote`;
|
|
60
59
|
const response = await client.clientFetch(url, {
|
|
61
60
|
record: {
|
|
62
|
-
value: -100,
|
|
63
61
|
...request,
|
|
64
62
|
},
|
|
65
63
|
});
|
|
66
64
|
return response;
|
|
67
65
|
}
|
|
68
|
-
exports.downvoteBot = downvoteBot;
|
package/dist/cjs/bot/v1.d.ts
CHANGED
|
@@ -5,62 +5,38 @@ export function updateBot(client: ChatBotKitClient, botId: string, request: BotU
|
|
|
5
5
|
export function deleteBot(client: ChatBotKitClient, botId: string): Promise<BotDeleteResponse>;
|
|
6
6
|
export function upvoteBot(client: ChatBotKitClient, botId: string, request: BotUpvoteRequest): Promise<BotUpvoteResponse>;
|
|
7
7
|
export function downvoteBot(client: ChatBotKitClient, botId: string, request: BotDownvoteRequest): Promise<BotDownvoteResponse>;
|
|
8
|
-
export type ChatBotKitClient = import(
|
|
9
|
-
export type ResponsePromise<T, U> = import(
|
|
10
|
-
export type BotOptions = {
|
|
11
|
-
name?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
backstory?: string;
|
|
14
|
-
model?: string;
|
|
15
|
-
datasetId?: string;
|
|
16
|
-
skillsetId?: string;
|
|
17
|
-
visibility?: 'private' | 'protected' | 'public';
|
|
18
|
-
meta?: Record<string, any>;
|
|
19
|
-
};
|
|
20
|
-
export type BotInstance = BotOptions & {
|
|
21
|
-
id: string;
|
|
22
|
-
createdAt: number;
|
|
23
|
-
updatedAt: number;
|
|
24
|
-
};
|
|
8
|
+
export type ChatBotKitClient = import("../client.js").ChatBotKitClient;
|
|
9
|
+
export type ResponsePromise<T, U> = import("../client.js").ResponsePromise<T, U>;
|
|
25
10
|
export type BotListRequest = {
|
|
26
11
|
cursor?: string;
|
|
27
|
-
order?:
|
|
12
|
+
order?: "desc" | "asc";
|
|
28
13
|
take?: number;
|
|
29
14
|
meta?: Record<string, string>;
|
|
30
15
|
};
|
|
31
|
-
export type BotListResponse =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export type
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
export type
|
|
39
|
-
export type
|
|
40
|
-
export type
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export type
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export type
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export type
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export type
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
export type BotUpvoteResponse = {
|
|
59
|
-
id: string;
|
|
60
|
-
};
|
|
61
|
-
export type BotDownvoteRequest = {
|
|
62
|
-
value?: number;
|
|
63
|
-
};
|
|
64
|
-
export type BotDownvoteResponse = {
|
|
65
|
-
id: string;
|
|
66
|
-
};
|
|
16
|
+
export type BotListResponse = import("../types/api/v1.js").operations["listBots"]["responses"]["200"]["content"]["application/json"];
|
|
17
|
+
export type BotListStreamType = import("../types/api/v1.js").operations["listBots"]["responses"]["200"]["content"]["application/jsonl"];
|
|
18
|
+
export type BotFetchResponse = import("../types/api/v1.js").operations["fetchBot"]["responses"]["200"]["content"]["application/json"];
|
|
19
|
+
export type BotCreateRequestBody = import("../types/api/v1.js").operations["createBot"]["requestBody"]["content"]["application/json"];
|
|
20
|
+
export type BotCreateRequest = Omit<BotCreateRequestBody, "model"> & {
|
|
21
|
+
model?: import("../model/v1.js").Model;
|
|
22
|
+
};
|
|
23
|
+
export type BotCreateResponseBody = import("../types/api/v1.js").operations["createBot"]["responses"]["200"]["content"]["application/json"];
|
|
24
|
+
export type BotCreateResponse = BotCreateResponseBody;
|
|
25
|
+
export type BotUpdateRequestBody = import("../types/api/v1.js").operations["updateBot"]["requestBody"]["content"]["application/json"];
|
|
26
|
+
export type BotUpdateRequest = Omit<BotUpdateRequestBody, "model"> & {
|
|
27
|
+
model?: import("../model/v1.js").Model;
|
|
28
|
+
};
|
|
29
|
+
export type BotUpdateResponseBody = import("../types/api/v1.js").operations["updateBot"]["responses"]["200"]["content"]["application/json"];
|
|
30
|
+
export type BotUpdateResponse = BotUpdateResponseBody;
|
|
31
|
+
export type BotDeleteRequestBody = import("../types/api/v1.js").operations["deleteBot"]["requestBody"]["content"]["application/json"];
|
|
32
|
+
export type BotDeleteRequest = BotDeleteRequestBody;
|
|
33
|
+
export type BotDeleteResponseBody = import("../types/api/v1.js").operations["deleteBot"]["responses"]["200"]["content"]["application/json"];
|
|
34
|
+
export type BotDeleteResponse = BotDeleteResponseBody;
|
|
35
|
+
export type BotUpvoteRequestBody = import("../types/api/v1.js").operations["upvoteBot"]["requestBody"]["content"]["application/json"];
|
|
36
|
+
export type BotUpvoteRequest = BotUpvoteRequestBody;
|
|
37
|
+
export type BotUpvoteResponseBody = import("../types/api/v1.js").operations["upvoteBot"]["responses"]["200"]["content"]["application/json"];
|
|
38
|
+
export type BotUpvoteResponse = BotUpvoteResponseBody;
|
|
39
|
+
export type BotDownvoteRequestBody = import("../types/api/v1.js").operations["downvoteBot"]["requestBody"]["content"]["application/json"];
|
|
40
|
+
export type BotDownvoteRequest = BotDownvoteRequestBody;
|
|
41
|
+
export type BotDownvoteResponseBody = import("../types/api/v1.js").operations["downvoteBot"]["responses"]["200"]["content"]["application/json"];
|
|
42
|
+
export type BotDownvoteResponse = BotDownvoteResponseBody;
|
package/dist/cjs/buffer.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBuffer =
|
|
3
|
+
exports.getBuffer = getBuffer;
|
|
4
4
|
function getBuffer(buffer) {
|
|
5
5
|
if (typeof buffer === 'string') {
|
|
6
|
-
return new TextEncoder().encode(buffer);
|
|
6
|
+
return new TextEncoder().encode(buffer).buffer;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
return
|
|
8
|
+
if (buffer instanceof ArrayBuffer) {
|
|
9
|
+
return buffer;
|
|
10
10
|
}
|
|
11
|
+
return buffer.buffer;
|
|
11
12
|
}
|
|
12
|
-
exports.getBuffer = getBuffer;
|
package/dist/cjs/client.cjs
CHANGED
|
@@ -96,6 +96,7 @@ class ResponsePromise {
|
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
98
|
return {
|
|
99
|
+
headers: response.headers,
|
|
99
100
|
data: await response.arrayBuffer(),
|
|
100
101
|
};
|
|
101
102
|
}
|
|
@@ -103,10 +104,20 @@ class ResponsePromise {
|
|
|
103
104
|
.then(onSuccess, onFail);
|
|
104
105
|
}
|
|
105
106
|
catch(fn) {
|
|
106
|
-
return this.
|
|
107
|
+
return this.then(undefined, fn);
|
|
107
108
|
}
|
|
108
109
|
finally(fn) {
|
|
109
|
-
return this.
|
|
110
|
+
return this.then((value) => {
|
|
111
|
+
if (fn) {
|
|
112
|
+
fn();
|
|
113
|
+
}
|
|
114
|
+
return value;
|
|
115
|
+
}, (reason) => {
|
|
116
|
+
if (fn) {
|
|
117
|
+
fn();
|
|
118
|
+
}
|
|
119
|
+
throw reason;
|
|
120
|
+
});
|
|
110
121
|
}
|
|
111
122
|
async *stream() {
|
|
112
123
|
const response = await this.getStreamPromise();
|
package/dist/cjs/client.d.ts
CHANGED
|
@@ -36,9 +36,9 @@ export class ResponsePromise<T, U> {
|
|
|
36
36
|
}): Promise<Response>;
|
|
37
37
|
getFetchPromise(): Promise<Response>;
|
|
38
38
|
getStreamPromise(): Promise<Response>;
|
|
39
|
-
then(onSuccess
|
|
40
|
-
catch(fn
|
|
41
|
-
finally(fn
|
|
39
|
+
then<TResult1, TResult2>(onSuccess?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onFail?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
40
|
+
catch<TResult>(fn?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
41
|
+
finally(fn?: (() => void) | undefined | null): Promise<T>;
|
|
42
42
|
stream(): AsyncGenerator<U>;
|
|
43
43
|
cache(key?: string): Promise<T>;
|
|
44
44
|
get [Symbol.toStringTag](): string;
|
|
@@ -56,7 +56,7 @@ export class ChatBotKitClient {
|
|
|
56
56
|
retries: number;
|
|
57
57
|
retryDelay: number;
|
|
58
58
|
retryTimeout: boolean;
|
|
59
|
-
fetchFn:
|
|
59
|
+
fetchFn: FetchFunction;
|
|
60
60
|
cacheMap: Map<any, any>;
|
|
61
61
|
clientFetch<T, U>(path: string, options?: {
|
|
62
62
|
method?: string;
|
|
@@ -78,11 +78,11 @@ export class ChatBotKitClient {
|
|
|
78
78
|
fetchFn?: FetchFunction;
|
|
79
79
|
}): ResponsePromise<T, U>;
|
|
80
80
|
}
|
|
81
|
-
export type FetchFunction = import(
|
|
81
|
+
export type FetchFunction = import("@chatbotkit/fetch").FetchFn<import("@chatbotkit/fetch").withRetryOptions & import("@chatbotkit/fetch").withTimeoutOptions>;
|
|
82
82
|
export type ChatBotKitClientOptions = {
|
|
83
83
|
secret: string;
|
|
84
84
|
host?: string;
|
|
85
|
-
protocol?:
|
|
85
|
+
protocol?: "http:" | "https:";
|
|
86
86
|
endpoints?: Record<string, string>;
|
|
87
87
|
runAsUserId?: string;
|
|
88
88
|
runAsChildUserEmail?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export class ConversationClient extends ChatBotKitClient {
|
|
2
|
-
list(contactId: string, request?: import(
|
|
2
|
+
list(contactId: string, request?: import("./v1.js").ConversationListRequest): ResponsePromise<import("./v1.js").ConversationListResponse, import("./v1.js").ConversationListStreamType>;
|
|
3
3
|
}
|
|
4
4
|
export default ConversationClient;
|
|
5
|
-
export type ResponsePromise<T, U> = import(
|
|
5
|
+
export type ResponsePromise<T, U> = import("../../client.js").ResponsePromise<T, U>;
|
|
6
6
|
import { ChatBotKitClient } from '../../client.cjs';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listConversations =
|
|
3
|
+
exports.listConversations = listConversations;
|
|
4
4
|
function listConversations(client, contactId, request) {
|
|
5
5
|
let url = `/api/v1/contact/${contactId}/conversation/list`;
|
|
6
6
|
const response = client.clientFetch(url, { query: request });
|
|
7
7
|
return response;
|
|
8
8
|
}
|
|
9
|
-
exports.listConversations = listConversations;
|
|
@@ -1,34 +1,11 @@
|
|
|
1
1
|
export function listConversations(client: ChatBotKitClient, contactId: string, request?: ConversationListRequest): ResponsePromise<ConversationListResponse, ConversationListStreamType>;
|
|
2
|
-
export type ChatBotKitClient = import(
|
|
3
|
-
export type ResponsePromise<T, U> = import(
|
|
4
|
-
export type ConversationOptions = {
|
|
5
|
-
name?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
contactId?: string;
|
|
8
|
-
taskId?: string;
|
|
9
|
-
botId?: string;
|
|
10
|
-
backstory?: string;
|
|
11
|
-
model?: string;
|
|
12
|
-
datasetId?: string;
|
|
13
|
-
skillsetId?: string;
|
|
14
|
-
meta?: Record<string, any>;
|
|
15
|
-
};
|
|
16
|
-
export type ConversationInstance = ConversationOptions & {
|
|
17
|
-
id: string;
|
|
18
|
-
createdAt: number;
|
|
19
|
-
updatedAt: number;
|
|
20
|
-
};
|
|
2
|
+
export type ChatBotKitClient = import("../../client.js").ChatBotKitClient;
|
|
3
|
+
export type ResponsePromise<T, U> = import("../../client.js").ResponsePromise<T, U>;
|
|
21
4
|
export type ConversationListRequest = {
|
|
22
5
|
cursor?: string;
|
|
23
|
-
order?:
|
|
6
|
+
order?: "desc" | "asc";
|
|
24
7
|
take?: number;
|
|
25
8
|
meta?: Record<string, string>;
|
|
26
9
|
};
|
|
27
|
-
export type ConversationListResponse =
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
export type ConversationListStreamItemType = {
|
|
31
|
-
type: 'item';
|
|
32
|
-
data: ConversationInstance;
|
|
33
|
-
};
|
|
34
|
-
export type ConversationListStreamType = ConversationListStreamItemType;
|
|
10
|
+
export type ConversationListResponse = import("../../types/api/v1.js").operations["listContactConversations"]["responses"]["200"]["content"]["application/json"];
|
|
11
|
+
export type ConversationListStreamType = import("../../types/api/v1.js").operations["listContactConversations"]["responses"]["200"]["content"]["application/jsonl"];
|
|
@@ -2,15 +2,15 @@ export class ContactClient extends ChatBotKitClient {
|
|
|
2
2
|
task: TaskClient;
|
|
3
3
|
conversation: ConversationClient;
|
|
4
4
|
secrets: SecretClient;
|
|
5
|
-
list(request?: import(
|
|
6
|
-
fetch(contactId: string): ResponsePromise<import(
|
|
7
|
-
create(request: import(
|
|
8
|
-
update(contactId: string, request: import(
|
|
9
|
-
delete(contactId: string): Promise<import(
|
|
10
|
-
ensure(request: import(
|
|
5
|
+
list(request?: import("./v1.js").ContactListRequest): ResponsePromise<import("./v1.js").ContactListResponse, import("./v1.js").ContactListStreamType>;
|
|
6
|
+
fetch(contactId: string): ResponsePromise<import("./v1.js").ContactFetchResponse, never>;
|
|
7
|
+
create(request: import("./v1.js").ContactCreateRequest): Promise<import("./v1.js").ContactCreateResponse>;
|
|
8
|
+
update(contactId: string, request: import("./v1.js").ContactUpdateRequest): Promise<import("./v1.js").ContactUpdateResponse>;
|
|
9
|
+
delete(contactId: string): Promise<import("./v1.js").ContactDeleteResponse>;
|
|
10
|
+
ensure(request: import("./v1.js").ContactEnsureRequest): Promise<import("./v1.js").ContactEnsureResponse>;
|
|
11
11
|
}
|
|
12
12
|
export default ContactClient;
|
|
13
|
-
export type ResponsePromise<T, U> = import(
|
|
13
|
+
export type ResponsePromise<T, U> = import("../client.js").ResponsePromise<T, U>;
|
|
14
14
|
import { ChatBotKitClient } from '../client.cjs';
|
|
15
15
|
import { TaskClient } from './task/index.cjs';
|
|
16
16
|
import { ConversationClient } from './conversation/index.cjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export class SecretClient extends ChatBotKitClient {
|
|
2
|
-
list(contactId: string, request?: import(
|
|
3
|
-
revoke(contactId: string, secretId: string):
|
|
4
|
-
verify(contactId: string, secretId: string):
|
|
5
|
-
authenticate(contactId: string, secretId: string):
|
|
2
|
+
list(contactId: string, request?: import("./v1.js").SecretListRequest): ResponsePromise<import("./v1.js").SecretListResponse, import("./v1.js").SecretListStreamType>;
|
|
3
|
+
revoke(contactId: string, secretId: string): Promise<import("./v1.js").SecretRevokeResponse>;
|
|
4
|
+
verify(contactId: string, secretId: string): Promise<import("./v1.js").SecretVerifyResponse>;
|
|
5
|
+
authenticate(contactId: string, secretId: string): Promise<import("./v1.js").SecretAuthenticateResponse>;
|
|
6
6
|
}
|
|
7
7
|
export default SecretClient;
|
|
8
|
-
export type ResponsePromise<T, U> = import(
|
|
8
|
+
export type ResponsePromise<T, U> = import("../../client.js").ResponsePromise<T, U>;
|
|
9
9
|
import { ChatBotKitClient } from '../../client.cjs';
|
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.listSecrets = listSecrets;
|
|
4
|
+
exports.revokeSecret = revokeSecret;
|
|
5
|
+
exports.verifySecret = verifySecret;
|
|
6
|
+
exports.authenticateSecret = authenticateSecret;
|
|
4
7
|
function listSecrets(client, contactId, request) {
|
|
5
8
|
let url = `/api/v1/contact/${contactId}/secret/list`;
|
|
6
9
|
const response = client.clientFetch(url, { query: request });
|
|
7
10
|
return response;
|
|
8
11
|
}
|
|
9
|
-
|
|
10
|
-
function revokeSecret(client, contactId, secretId) {
|
|
12
|
+
async function revokeSecret(client, contactId, secretId) {
|
|
11
13
|
const url = `/api/v1/contact/${contactId}/secret/${secretId}/revoke`;
|
|
12
|
-
const response = client.clientFetch(url, {
|
|
14
|
+
const response = await client.clientFetch(url, {
|
|
13
15
|
record: {},
|
|
14
16
|
});
|
|
15
17
|
return response;
|
|
16
18
|
}
|
|
17
|
-
|
|
18
|
-
function verifySecret(client, contactId, secretId) {
|
|
19
|
+
async function verifySecret(client, contactId, secretId) {
|
|
19
20
|
const url = `/api/v1/contact/${contactId}/secret/${secretId}/verify`;
|
|
20
|
-
const response = client.clientFetch(url, {
|
|
21
|
+
const response = await client.clientFetch(url, {
|
|
21
22
|
record: {},
|
|
22
23
|
});
|
|
23
24
|
return response;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
function authenticateSecret(client, contactId, secretId) {
|
|
26
|
+
async function authenticateSecret(client, contactId, secretId) {
|
|
27
27
|
const url = `/api/v1/contact/${contactId}/secret/${secretId}/authenticate`;
|
|
28
|
-
const response = client.clientFetch(url, {
|
|
28
|
+
const response = await client.clientFetch(url, {
|
|
29
29
|
record: {},
|
|
30
30
|
});
|
|
31
31
|
return response;
|
|
32
32
|
}
|
|
33
|
-
exports.authenticateSecret = authenticateSecret;
|