@chatbotkit/sdk 1.21.7 → 1.21.8
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/README.md +1 -2
- package/dist/cjs/index.cjs +21 -18
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/platform/index.cjs +4 -2
- package/dist/cjs/platform/index.d.ts +3 -1
- package/dist/cjs/platform/report/index.cjs +15 -0
- package/dist/cjs/platform/report/index.d.ts +6 -0
- package/dist/cjs/platform/report/v1.cjs +8 -0
- package/dist/cjs/platform/report/v1.d.ts +12 -0
- package/dist/cjs/report/index.cjs +18 -0
- package/dist/cjs/report/index.d.ts +6 -0
- package/dist/cjs/report/v1.cjs +22 -0
- package/dist/cjs/report/v1.d.ts +9 -0
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/platform/index.d.ts +3 -1
- package/dist/esm/platform/index.js +3 -1
- package/dist/esm/platform/report/index.d.ts +6 -0
- package/dist/esm/platform/report/index.js +11 -0
- package/dist/esm/platform/report/v1.d.ts +12 -0
- package/dist/esm/platform/report/v1.js +5 -0
- package/dist/esm/report/index.d.ts +6 -0
- package/dist/esm/report/index.js +14 -0
- package/dist/esm/report/v1.d.ts +9 -0
- package/dist/esm/report/v1.js +18 -0
- package/dist/esm/types/report.json +883 -0
- package/package.json +101 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ const client = new ConversationClient({
|
|
|
33
33
|
|
|
34
34
|
// Stream messages using the ConversationClient
|
|
35
35
|
for await (const { type, data } of client
|
|
36
|
-
.complete(null, { model: 'gpt-
|
|
36
|
+
.complete(null, { model: 'gpt-5-mini', messages })
|
|
37
37
|
.stream()) {
|
|
38
38
|
if (type === 'token') {
|
|
39
39
|
process.stdout.write(data.token)
|
|
@@ -57,4 +57,3 @@ Encountered a bug or interested in contributing? Your participation is highly ap
|
|
|
57
57
|
|
|
58
58
|
- [FormShare](https://formshare.ai/) - Bring your forms to life with generative UI.
|
|
59
59
|
- [PeopleAI](https://people.ai/) - Experience history like never before with our AI chatbots.
|
|
60
|
-
- [AskNotion](https://asknotion.app/) - Create your personal ChatGPT-like chatbot that is trained on your Notion Pages.
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChatBotKit = exports.UsageClient = exports.SpaceClient = exports.GraphqlClient = exports.PortalClient = exports.PolicyClient = exports.MemoryClient = exports.TeamClient = exports.SecretClient = exports.ContactClient = exports.ConversationClient = exports.IntegrationClient = exports.SkillsetClient = exports.DatasetClient = exports.PartnerClient = exports.MagicClient = exports.FileClient = exports.ChannelClient = exports.BotClient = exports.BlueprintClient = void 0;
|
|
3
|
+
exports.ChatBotKit = exports.UsageClient = exports.SpaceClient = exports.GraphqlClient = exports.ReportClient = exports.PortalClient = exports.PolicyClient = exports.MemoryClient = exports.TeamClient = exports.SecretClient = exports.ContactClient = exports.ConversationClient = exports.IntegrationClient = exports.SkillsetClient = exports.DatasetClient = exports.PartnerClient = exports.MagicClient = exports.FileClient = exports.ChannelClient = exports.BotClient = exports.BlueprintClient = void 0;
|
|
4
4
|
const index_js_1 = require("./blueprint/index.cjs");
|
|
5
5
|
Object.defineProperty(exports, "BlueprintClient", { enumerable: true, get: function () { return index_js_1.BlueprintClient; } });
|
|
6
6
|
const index_js_2 = require("./bot/index.cjs");
|
|
@@ -31,17 +31,19 @@ const index_js_14 = require("./policy/index.cjs");
|
|
|
31
31
|
Object.defineProperty(exports, "PolicyClient", { enumerable: true, get: function () { return index_js_14.PolicyClient; } });
|
|
32
32
|
const index_js_15 = require("./portal/index.cjs");
|
|
33
33
|
Object.defineProperty(exports, "PortalClient", { enumerable: true, get: function () { return index_js_15.PortalClient; } });
|
|
34
|
-
const index_js_16 = require("./
|
|
35
|
-
Object.defineProperty(exports, "
|
|
36
|
-
const index_js_17 = require("./
|
|
37
|
-
Object.defineProperty(exports, "
|
|
38
|
-
const index_js_18 = require("./
|
|
39
|
-
Object.defineProperty(exports, "
|
|
40
|
-
const index_js_19 = require("./
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const index_js_21 = require("./
|
|
44
|
-
Object.defineProperty(exports, "
|
|
34
|
+
const index_js_16 = require("./report/index.cjs");
|
|
35
|
+
Object.defineProperty(exports, "ReportClient", { enumerable: true, get: function () { return index_js_16.ReportClient; } });
|
|
36
|
+
const index_js_17 = require("./secret/index.cjs");
|
|
37
|
+
Object.defineProperty(exports, "SecretClient", { enumerable: true, get: function () { return index_js_17.SecretClient; } });
|
|
38
|
+
const index_js_18 = require("./skillset/index.cjs");
|
|
39
|
+
Object.defineProperty(exports, "SkillsetClient", { enumerable: true, get: function () { return index_js_18.SkillsetClient; } });
|
|
40
|
+
const index_js_19 = require("./space/index.cjs");
|
|
41
|
+
Object.defineProperty(exports, "SpaceClient", { enumerable: true, get: function () { return index_js_19.SpaceClient; } });
|
|
42
|
+
const index_js_20 = require("./task/index.cjs");
|
|
43
|
+
const index_js_21 = require("./team/index.cjs");
|
|
44
|
+
Object.defineProperty(exports, "TeamClient", { enumerable: true, get: function () { return index_js_21.TeamClient; } });
|
|
45
|
+
const index_js_22 = require("./usage/index.cjs");
|
|
46
|
+
Object.defineProperty(exports, "UsageClient", { enumerable: true, get: function () { return index_js_22.UsageClient; } });
|
|
45
47
|
class ChatBotKit extends client_js_1.ChatBotKitClient {
|
|
46
48
|
constructor(options) {
|
|
47
49
|
super(options);
|
|
@@ -50,21 +52,22 @@ class ChatBotKit extends client_js_1.ChatBotKitClient {
|
|
|
50
52
|
this.bot = new index_js_2.BotClient(options);
|
|
51
53
|
this.channel = new index_js_3.ChannelClient(options);
|
|
52
54
|
this.file = new index_js_7.FileClient(options);
|
|
53
|
-
this.secret = new
|
|
55
|
+
this.secret = new index_js_17.SecretClient(options);
|
|
54
56
|
this.magic = new index_js_10.MagicClient(options);
|
|
55
57
|
this.partner = new index_js_12.PartnerClient(options);
|
|
56
58
|
this.dataset = new index_js_6.DatasetClient(options);
|
|
57
|
-
this.skillset = new
|
|
59
|
+
this.skillset = new index_js_18.SkillsetClient(options);
|
|
58
60
|
this.integration = new index_js_9.IntegrationClient(options);
|
|
59
|
-
this.team = new
|
|
61
|
+
this.team = new index_js_21.TeamClient(options);
|
|
60
62
|
this.contact = new index_js_4.ContactClient(options);
|
|
61
|
-
this.space = new
|
|
62
|
-
this.task = new
|
|
63
|
+
this.space = new index_js_19.SpaceClient(options);
|
|
64
|
+
this.task = new index_js_20.TaskClient(options);
|
|
63
65
|
this.conversation = new index_js_5.ConversationClient(options);
|
|
64
66
|
this.memory = new index_js_11.MemoryClient(options);
|
|
65
67
|
this.policy = new index_js_14.PolicyClient(options);
|
|
66
68
|
this.portal = new index_js_15.PortalClient(options);
|
|
67
|
-
this.
|
|
69
|
+
this.report = new index_js_16.ReportClient(options);
|
|
70
|
+
this.usage = new index_js_22.UsageClient(options);
|
|
68
71
|
this.graphql = new index_js_8.GraphqlClient(options);
|
|
69
72
|
}
|
|
70
73
|
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export class ChatBotKit extends ChatBotKitClient {
|
|
|
18
18
|
memory: MemoryClient;
|
|
19
19
|
policy: PolicyClient;
|
|
20
20
|
portal: PortalClient;
|
|
21
|
+
report: ReportClient;
|
|
21
22
|
usage: UsageClient;
|
|
22
23
|
graphql: GraphqlClient;
|
|
23
24
|
}
|
|
@@ -38,10 +39,11 @@ import { TeamClient } from './team/index.cjs';
|
|
|
38
39
|
import { MemoryClient } from './memory/index.cjs';
|
|
39
40
|
import { PolicyClient } from './policy/index.cjs';
|
|
40
41
|
import { PortalClient } from './portal/index.cjs';
|
|
42
|
+
import { ReportClient } from './report/index.cjs';
|
|
41
43
|
import { GraphqlClient } from './graphql/index.cjs';
|
|
42
44
|
import { SpaceClient } from './space/index.cjs';
|
|
43
45
|
import { UsageClient } from './usage/index.cjs';
|
|
44
46
|
import { ChatBotKitClient } from './client.cjs';
|
|
45
47
|
import { PlatformClient } from './platform/index.cjs';
|
|
46
48
|
import { TaskClient } from './task/index.cjs';
|
|
47
|
-
export { BlueprintClient, BotClient, ChannelClient, FileClient, MagicClient, PartnerClient, DatasetClient, SkillsetClient, IntegrationClient, ConversationClient, ContactClient, SecretClient, TeamClient, MemoryClient, PolicyClient, PortalClient, GraphqlClient, SpaceClient, UsageClient };
|
|
49
|
+
export { BlueprintClient, BotClient, ChannelClient, FileClient, MagicClient, PartnerClient, DatasetClient, SkillsetClient, IntegrationClient, ConversationClient, ContactClient, SecretClient, TeamClient, MemoryClient, PolicyClient, PortalClient, ReportClient, GraphqlClient, SpaceClient, UsageClient };
|
|
@@ -7,7 +7,8 @@ const index_js_2 = require("./action/index.cjs");
|
|
|
7
7
|
const index_js_3 = require("./content/index.cjs");
|
|
8
8
|
const index_js_4 = require("./example/index.cjs");
|
|
9
9
|
const index_js_5 = require("./model/index.cjs");
|
|
10
|
-
const index_js_6 = require("./
|
|
10
|
+
const index_js_6 = require("./report/index.cjs");
|
|
11
|
+
const index_js_7 = require("./secret/index.cjs");
|
|
11
12
|
class PlatformClient extends client_js_1.ChatBotKitClient {
|
|
12
13
|
constructor(options) {
|
|
13
14
|
super(options);
|
|
@@ -15,8 +16,9 @@ class PlatformClient extends client_js_1.ChatBotKitClient {
|
|
|
15
16
|
this.ability = new index_js_1.PlatformAbilityClient(options);
|
|
16
17
|
this.action = new index_js_2.PlatformActionClient(options);
|
|
17
18
|
this.content = new index_js_3.PlatformContentClient(options);
|
|
18
|
-
this.
|
|
19
|
+
this.secret = new index_js_7.PlatformSecretClient(options);
|
|
19
20
|
this.example = new index_js_4.PlatformExampleClient(options);
|
|
21
|
+
this.report = new index_js_6.PlatformReportClient(options);
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
exports.PlatformClient = PlatformClient;
|
|
@@ -3,8 +3,9 @@ export class PlatformClient extends ChatBotKitClient {
|
|
|
3
3
|
ability: PlatformAbilityClient;
|
|
4
4
|
action: PlatformActionClient;
|
|
5
5
|
content: PlatformContentClient;
|
|
6
|
-
|
|
6
|
+
secret: PlatformSecretClient;
|
|
7
7
|
example: PlatformExampleClient;
|
|
8
|
+
report: PlatformReportClient;
|
|
8
9
|
}
|
|
9
10
|
export default PlatformClient;
|
|
10
11
|
import { ChatBotKitClient } from '../client.cjs';
|
|
@@ -14,3 +15,4 @@ import { PlatformActionClient } from './action/index.cjs';
|
|
|
14
15
|
import { PlatformContentClient } from './content/index.cjs';
|
|
15
16
|
import { PlatformSecretClient } from './secret/index.cjs';
|
|
16
17
|
import { PlatformExampleClient } from './example/index.cjs';
|
|
18
|
+
import { PlatformReportClient } from './report/index.cjs';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlatformReportClient = void 0;
|
|
4
|
+
const client_js_1 = require("../../client.cjs");
|
|
5
|
+
const v1_js_1 = require("./v1.cjs");
|
|
6
|
+
class PlatformReportClient extends client_js_1.ChatBotKitClient {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
}
|
|
10
|
+
list(request) {
|
|
11
|
+
return (0, v1_js_1.listPlatformReports)(this, request);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.PlatformReportClient = PlatformReportClient;
|
|
15
|
+
exports.default = PlatformReportClient;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class PlatformReportClient extends ChatBotKitClient {
|
|
2
|
+
list(request?: import("./v1.js").PlatformReportListRequest): ResponsePromise<import("./v1.js").PlatformReportListResponse, import("./v1.js").PlatformReportListStreamType>;
|
|
3
|
+
}
|
|
4
|
+
export default PlatformReportClient;
|
|
5
|
+
export type ResponsePromise<T, U> = import("../../client.js").ResponsePromise<T, U>;
|
|
6
|
+
import { ChatBotKitClient } from '../../client.cjs';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listPlatformReports = listPlatformReports;
|
|
4
|
+
function listPlatformReports(client, request) {
|
|
5
|
+
let url = `/api/v1/platform/report/list`;
|
|
6
|
+
const response = client.clientFetch(url, { query: request });
|
|
7
|
+
return response;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function listPlatformReports(client: ChatBotKitClient, request?: PlatformReportListRequest): ResponsePromise<PlatformReportListResponse, PlatformReportListStreamType>;
|
|
2
|
+
export type ChatBotKitClient = import("../../client.js").ChatBotKitClient;
|
|
3
|
+
export type ResponsePromise<T, U> = import("../../client.js").ResponsePromise<T, U>;
|
|
4
|
+
export type PlatformReportListRequest = {
|
|
5
|
+
cursor?: string;
|
|
6
|
+
order?: "desc" | "asc";
|
|
7
|
+
take?: number;
|
|
8
|
+
meta?: Record<string, string>;
|
|
9
|
+
};
|
|
10
|
+
export type PlatformReportListResponse = import("../../types/api/v1.js").operations["listPlatformReports"]["responses"]["200"]["content"]["application/json"];
|
|
11
|
+
export type PlatformReportListItem = PlatformReportListResponse["items"][number];
|
|
12
|
+
export type PlatformReportListStreamType = import("../../types/api/v1.js").operations["listPlatformReports"]["responses"]["200"]["content"]["application/jsonl"];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReportClient = void 0;
|
|
4
|
+
const client_js_1 = require("../client.cjs");
|
|
5
|
+
const v1_js_1 = require("./v1.cjs");
|
|
6
|
+
class ReportClient extends client_js_1.ChatBotKitClient {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
}
|
|
10
|
+
fetch(reportId, request) {
|
|
11
|
+
return (0, v1_js_1.fetchReport)(this, reportId, request);
|
|
12
|
+
}
|
|
13
|
+
fetchTyped(reportId, request) {
|
|
14
|
+
return (0, v1_js_1.fetchTypedReport)(this, reportId, request);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ReportClient = ReportClient;
|
|
18
|
+
exports.default = ReportClient;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class ReportClient extends ChatBotKitClient {
|
|
2
|
+
fetch(reportId: string, request: import("./v1.js").ReportFetchRequest): Promise<import("./v1.js").ReportFetchResponse>;
|
|
3
|
+
fetchTyped<T extends import("./v1.js").ReportId>(reportId: T, request: import("./v1.js").ReportInputTypes[T]): Promise<import("./v1.js").ReportOutputTypes[T]>;
|
|
4
|
+
}
|
|
5
|
+
export default ReportClient;
|
|
6
|
+
import { ChatBotKitClient } from '../client.cjs';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchReport = fetchReport;
|
|
4
|
+
exports.fetchTypedReport = fetchTypedReport;
|
|
5
|
+
async function fetchReport(client, reportId, request) {
|
|
6
|
+
const url = `/api/v1/report/${reportId}/fetch`;
|
|
7
|
+
const response = await client.clientFetch(url, {
|
|
8
|
+
record: {
|
|
9
|
+
...request,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
return response;
|
|
13
|
+
}
|
|
14
|
+
async function fetchTypedReport(client, reportId, request) {
|
|
15
|
+
const url = `/api/v1/report/${reportId}/fetch`;
|
|
16
|
+
const response = await client.clientFetch(url, {
|
|
17
|
+
record: {
|
|
18
|
+
...request,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function fetchReport(client: ChatBotKitClient, reportId: string, request: ReportFetchRequest): Promise<ReportFetchResponse>;
|
|
2
|
+
export function fetchTypedReport<T extends ReportId>(client: ChatBotKitClient, reportId: T, request: ReportInputTypes[T]): Promise<ReportOutputTypes[T]>;
|
|
3
|
+
export type ChatBotKitClient = import("../client.js").ChatBotKitClient;
|
|
4
|
+
export type ReportFetchRequestBody = import("../types/api/v1.js").operations["fetchReport"]["requestBody"]["content"]["application/json"];
|
|
5
|
+
export type ReportFetchRequest = ReportFetchRequestBody;
|
|
6
|
+
export type ReportFetchResponse = import("../types/api/v1.js").operations["fetchReport"]["responses"]["200"]["content"]["application/json"];
|
|
7
|
+
export type ReportId = import("../types/report.js").ReportId;
|
|
8
|
+
export type ReportInputTypes = import("../types/report.js").ReportInputTypes;
|
|
9
|
+
export type ReportOutputTypes = import("../types/report.js").ReportOutputTypes;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export class ChatBotKit extends ChatBotKitClient {
|
|
|
18
18
|
memory: MemoryClient;
|
|
19
19
|
policy: PolicyClient;
|
|
20
20
|
portal: PortalClient;
|
|
21
|
+
report: ReportClient;
|
|
21
22
|
usage: UsageClient;
|
|
22
23
|
graphql: GraphqlClient;
|
|
23
24
|
}
|
|
@@ -38,10 +39,11 @@ import { TeamClient } from './team/index.js';
|
|
|
38
39
|
import { MemoryClient } from './memory/index.js';
|
|
39
40
|
import { PolicyClient } from './policy/index.js';
|
|
40
41
|
import { PortalClient } from './portal/index.js';
|
|
42
|
+
import { ReportClient } from './report/index.js';
|
|
41
43
|
import { GraphqlClient } from './graphql/index.js';
|
|
42
44
|
import { SpaceClient } from './space/index.js';
|
|
43
45
|
import { UsageClient } from './usage/index.js';
|
|
44
46
|
import { ChatBotKitClient } from './client.js';
|
|
45
47
|
import { PlatformClient } from './platform/index.js';
|
|
46
48
|
import { TaskClient } from './task/index.js';
|
|
47
|
-
export { BlueprintClient, BotClient, ChannelClient, FileClient, MagicClient, PartnerClient, DatasetClient, SkillsetClient, IntegrationClient, ConversationClient, ContactClient, SecretClient, TeamClient, MemoryClient, PolicyClient, PortalClient, GraphqlClient, SpaceClient, UsageClient };
|
|
49
|
+
export { BlueprintClient, BotClient, ChannelClient, FileClient, MagicClient, PartnerClient, DatasetClient, SkillsetClient, IntegrationClient, ConversationClient, ContactClient, SecretClient, TeamClient, MemoryClient, PolicyClient, PortalClient, ReportClient, GraphqlClient, SpaceClient, UsageClient };
|
package/dist/esm/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { PartnerClient } from './partner/index.js';
|
|
|
14
14
|
import { PlatformClient } from './platform/index.js';
|
|
15
15
|
import { PolicyClient } from './policy/index.js';
|
|
16
16
|
import { PortalClient } from './portal/index.js';
|
|
17
|
+
import { ReportClient } from './report/index.js';
|
|
17
18
|
import { SecretClient } from './secret/index.js';
|
|
18
19
|
import { SkillsetClient } from './skillset/index.js';
|
|
19
20
|
import { SpaceClient } from './space/index.js';
|
|
@@ -36,6 +37,7 @@ export { TeamClient };
|
|
|
36
37
|
export { MemoryClient };
|
|
37
38
|
export { PolicyClient };
|
|
38
39
|
export { PortalClient };
|
|
40
|
+
export { ReportClient };
|
|
39
41
|
export { GraphqlClient };
|
|
40
42
|
export { SpaceClient };
|
|
41
43
|
export { UsageClient };
|
|
@@ -61,6 +63,7 @@ export class ChatBotKit extends ChatBotKitClient {
|
|
|
61
63
|
this.memory = new MemoryClient(options);
|
|
62
64
|
this.policy = new PolicyClient(options);
|
|
63
65
|
this.portal = new PortalClient(options);
|
|
66
|
+
this.report = new ReportClient(options);
|
|
64
67
|
this.usage = new UsageClient(options);
|
|
65
68
|
this.graphql = new GraphqlClient(options);
|
|
66
69
|
}
|
|
@@ -3,8 +3,9 @@ export class PlatformClient extends ChatBotKitClient {
|
|
|
3
3
|
ability: PlatformAbilityClient;
|
|
4
4
|
action: PlatformActionClient;
|
|
5
5
|
content: PlatformContentClient;
|
|
6
|
-
|
|
6
|
+
secret: PlatformSecretClient;
|
|
7
7
|
example: PlatformExampleClient;
|
|
8
|
+
report: PlatformReportClient;
|
|
8
9
|
}
|
|
9
10
|
export default PlatformClient;
|
|
10
11
|
import { ChatBotKitClient } from '../client.js';
|
|
@@ -14,3 +15,4 @@ import { PlatformActionClient } from './action/index.js';
|
|
|
14
15
|
import { PlatformContentClient } from './content/index.js';
|
|
15
16
|
import { PlatformSecretClient } from './secret/index.js';
|
|
16
17
|
import { PlatformExampleClient } from './example/index.js';
|
|
18
|
+
import { PlatformReportClient } from './report/index.js';
|
|
@@ -4,6 +4,7 @@ import { PlatformActionClient } from './action/index.js';
|
|
|
4
4
|
import { PlatformContentClient } from './content/index.js';
|
|
5
5
|
import { PlatformExampleClient } from './example/index.js';
|
|
6
6
|
import { PlatformModelClient } from './model/index.js';
|
|
7
|
+
import { PlatformReportClient } from './report/index.js';
|
|
7
8
|
import { PlatformSecretClient } from './secret/index.js';
|
|
8
9
|
export class PlatformClient extends ChatBotKitClient {
|
|
9
10
|
constructor(options) {
|
|
@@ -12,8 +13,9 @@ export class PlatformClient extends ChatBotKitClient {
|
|
|
12
13
|
this.ability = new PlatformAbilityClient(options);
|
|
13
14
|
this.action = new PlatformActionClient(options);
|
|
14
15
|
this.content = new PlatformContentClient(options);
|
|
15
|
-
this.
|
|
16
|
+
this.secret = new PlatformSecretClient(options);
|
|
16
17
|
this.example = new PlatformExampleClient(options);
|
|
18
|
+
this.report = new PlatformReportClient(options);
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
export default PlatformClient;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class PlatformReportClient extends ChatBotKitClient {
|
|
2
|
+
list(request?: import("./v1.js").PlatformReportListRequest): ResponsePromise<import("./v1.js").PlatformReportListResponse, import("./v1.js").PlatformReportListStreamType>;
|
|
3
|
+
}
|
|
4
|
+
export default PlatformReportClient;
|
|
5
|
+
export type ResponsePromise<T, U> = import("../../client.js").ResponsePromise<T, U>;
|
|
6
|
+
import { ChatBotKitClient } from '../../client.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChatBotKitClient } from '../../client.js';
|
|
2
|
+
import { listPlatformReports } from './v1.js';
|
|
3
|
+
export class PlatformReportClient extends ChatBotKitClient {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
}
|
|
7
|
+
list(request) {
|
|
8
|
+
return listPlatformReports(this, request);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export default PlatformReportClient;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function listPlatformReports(client: ChatBotKitClient, request?: PlatformReportListRequest): ResponsePromise<PlatformReportListResponse, PlatformReportListStreamType>;
|
|
2
|
+
export type ChatBotKitClient = import("../../client.js").ChatBotKitClient;
|
|
3
|
+
export type ResponsePromise<T, U> = import("../../client.js").ResponsePromise<T, U>;
|
|
4
|
+
export type PlatformReportListRequest = {
|
|
5
|
+
cursor?: string;
|
|
6
|
+
order?: "desc" | "asc";
|
|
7
|
+
take?: number;
|
|
8
|
+
meta?: Record<string, string>;
|
|
9
|
+
};
|
|
10
|
+
export type PlatformReportListResponse = import("../../types/api/v1.js").operations["listPlatformReports"]["responses"]["200"]["content"]["application/json"];
|
|
11
|
+
export type PlatformReportListItem = PlatformReportListResponse["items"][number];
|
|
12
|
+
export type PlatformReportListStreamType = import("../../types/api/v1.js").operations["listPlatformReports"]["responses"]["200"]["content"]["application/jsonl"];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class ReportClient extends ChatBotKitClient {
|
|
2
|
+
fetch(reportId: string, request: import("./v1.js").ReportFetchRequest): Promise<import("./v1.js").ReportFetchResponse>;
|
|
3
|
+
fetchTyped<T extends import("./v1.js").ReportId>(reportId: T, request: import("./v1.js").ReportInputTypes[T]): Promise<import("./v1.js").ReportOutputTypes[T]>;
|
|
4
|
+
}
|
|
5
|
+
export default ReportClient;
|
|
6
|
+
import { ChatBotKitClient } from '../client.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChatBotKitClient } from '../client.js';
|
|
2
|
+
import { fetchReport, fetchTypedReport } from './v1.js';
|
|
3
|
+
export class ReportClient extends ChatBotKitClient {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
}
|
|
7
|
+
fetch(reportId, request) {
|
|
8
|
+
return fetchReport(this, reportId, request);
|
|
9
|
+
}
|
|
10
|
+
fetchTyped(reportId, request) {
|
|
11
|
+
return fetchTypedReport(this, reportId, request);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export default ReportClient;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function fetchReport(client: ChatBotKitClient, reportId: string, request: ReportFetchRequest): Promise<ReportFetchResponse>;
|
|
2
|
+
export function fetchTypedReport<T extends ReportId>(client: ChatBotKitClient, reportId: T, request: ReportInputTypes[T]): Promise<ReportOutputTypes[T]>;
|
|
3
|
+
export type ChatBotKitClient = import("../client.js").ChatBotKitClient;
|
|
4
|
+
export type ReportFetchRequestBody = import("../types/api/v1.js").operations["fetchReport"]["requestBody"]["content"]["application/json"];
|
|
5
|
+
export type ReportFetchRequest = ReportFetchRequestBody;
|
|
6
|
+
export type ReportFetchResponse = import("../types/api/v1.js").operations["fetchReport"]["responses"]["200"]["content"]["application/json"];
|
|
7
|
+
export type ReportId = import("../types/report.js").ReportId;
|
|
8
|
+
export type ReportInputTypes = import("../types/report.js").ReportInputTypes;
|
|
9
|
+
export type ReportOutputTypes = import("../types/report.js").ReportOutputTypes;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export async function fetchReport(client, reportId, request) {
|
|
2
|
+
const url = `/api/v1/report/${reportId}/fetch`;
|
|
3
|
+
const response = await client.clientFetch(url, {
|
|
4
|
+
record: {
|
|
5
|
+
...request,
|
|
6
|
+
},
|
|
7
|
+
});
|
|
8
|
+
return response;
|
|
9
|
+
}
|
|
10
|
+
export async function fetchTypedReport(client, reportId, request) {
|
|
11
|
+
const url = `/api/v1/report/${reportId}/fetch`;
|
|
12
|
+
const response = await client.clientFetch(url, {
|
|
13
|
+
record: {
|
|
14
|
+
...request,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
return response;
|
|
18
|
+
}
|