@botpress/client 0.23.0 → 0.23.2
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/.turbo/turbo-build.log +5 -5
- package/.turbo/turbo-generate.log +1 -1
- package/dist/bundle.cjs +11 -11
- package/dist/bundle.cjs.map +4 -4
- package/dist/errors.d.ts +2 -0
- package/dist/gen/index.d.ts +12 -0
- package/dist/gen/models.d.ts +7 -2
- package/dist/gen/operations/createBotVersion.d.ts +28 -0
- package/dist/gen/operations/deployBotVersion.d.ts +22 -0
- package/dist/gen/operations/getBotVersion.d.ts +23 -0
- package/dist/gen/operations/getFile.d.ts +2 -2
- package/dist/gen/operations/listBotVersions.d.ts +26 -0
- package/dist/gen/operations/listFiles.d.ts +2 -2
- package/dist/gen/operations/updateFileMetadata.d.ts +2 -2
- package/dist/gen/operations/upsertFile.d.ts +6 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +4 -4
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +4 -4
- package/dist/types.d.ts +3 -4
- package/package.json +2 -2
- package/tests/manual/file-upload.test.ts +12 -4
package/dist/errors.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare class UploadFileError extends Error {
|
|
|
6
6
|
id: string;
|
|
7
7
|
botId: string;
|
|
8
8
|
key: string;
|
|
9
|
+
url: string;
|
|
9
10
|
size: number | null;
|
|
10
11
|
contentType: string;
|
|
11
12
|
tags: {
|
|
@@ -23,6 +24,7 @@ export declare class UploadFileError extends Error {
|
|
|
23
24
|
id: string;
|
|
24
25
|
botId: string;
|
|
25
26
|
key: string;
|
|
27
|
+
url: string;
|
|
26
28
|
size: number | null;
|
|
27
29
|
contentType: string;
|
|
28
30
|
tags: {
|
package/dist/gen/index.d.ts
CHANGED
|
@@ -61,6 +61,10 @@ import * as getBotIssue from './operations/getBotIssue';
|
|
|
61
61
|
import * as listBotIssues from './operations/listBotIssues';
|
|
62
62
|
import * as deleteBotIssue from './operations/deleteBotIssue';
|
|
63
63
|
import * as listBotIssueEvents from './operations/listBotIssueEvents';
|
|
64
|
+
import * as listBotVersions from './operations/listBotVersions';
|
|
65
|
+
import * as getBotVersion from './operations/getBotVersion';
|
|
66
|
+
import * as createBotVersion from './operations/createBotVersion';
|
|
67
|
+
import * as deployBotVersion from './operations/deployBotVersion';
|
|
64
68
|
import * as setWorkspacePaymentMethod from './operations/setWorkspacePaymentMethod';
|
|
65
69
|
import * as listWorkspaceInvoices from './operations/listWorkspaceInvoices';
|
|
66
70
|
import * as getUpcomingInvoice from './operations/getUpcomingInvoice';
|
|
@@ -188,6 +192,10 @@ export * as getBotIssue from './operations/getBotIssue';
|
|
|
188
192
|
export * as listBotIssues from './operations/listBotIssues';
|
|
189
193
|
export * as deleteBotIssue from './operations/deleteBotIssue';
|
|
190
194
|
export * as listBotIssueEvents from './operations/listBotIssueEvents';
|
|
195
|
+
export * as listBotVersions from './operations/listBotVersions';
|
|
196
|
+
export * as getBotVersion from './operations/getBotVersion';
|
|
197
|
+
export * as createBotVersion from './operations/createBotVersion';
|
|
198
|
+
export * as deployBotVersion from './operations/deployBotVersion';
|
|
191
199
|
export * as setWorkspacePaymentMethod from './operations/setWorkspacePaymentMethod';
|
|
192
200
|
export * as listWorkspaceInvoices from './operations/listWorkspaceInvoices';
|
|
193
201
|
export * as getUpcomingInvoice from './operations/getUpcomingInvoice';
|
|
@@ -321,6 +329,10 @@ export declare class Client {
|
|
|
321
329
|
readonly listBotIssues: (input: listBotIssues.ListBotIssuesInput) => Promise<listBotIssues.ListBotIssuesResponse>;
|
|
322
330
|
readonly deleteBotIssue: (input: deleteBotIssue.DeleteBotIssueInput) => Promise<deleteBotIssue.DeleteBotIssueResponse>;
|
|
323
331
|
readonly listBotIssueEvents: (input: listBotIssueEvents.ListBotIssueEventsInput) => Promise<listBotIssueEvents.ListBotIssueEventsResponse>;
|
|
332
|
+
readonly listBotVersions: (input: listBotVersions.ListBotVersionsInput) => Promise<listBotVersions.ListBotVersionsResponse>;
|
|
333
|
+
readonly getBotVersion: (input: getBotVersion.GetBotVersionInput) => Promise<getBotVersion.GetBotVersionResponse>;
|
|
334
|
+
readonly createBotVersion: (input: createBotVersion.CreateBotVersionInput) => Promise<createBotVersion.CreateBotVersionResponse>;
|
|
335
|
+
readonly deployBotVersion: (input: deployBotVersion.DeployBotVersionInput) => Promise<deployBotVersion.DeployBotVersionResponse>;
|
|
324
336
|
readonly setWorkspacePaymentMethod: (input: setWorkspacePaymentMethod.SetWorkspacePaymentMethodInput) => Promise<setWorkspacePaymentMethod.SetWorkspacePaymentMethodResponse>;
|
|
325
337
|
readonly listWorkspaceInvoices: (input: listWorkspaceInvoices.ListWorkspaceInvoicesInput) => Promise<listWorkspaceInvoices.ListWorkspaceInvoicesResponse>;
|
|
326
338
|
readonly getUpcomingInvoice: (input: getUpcomingInvoice.GetUpcomingInvoiceInput) => Promise<getUpcomingInvoice.GetUpcomingInvoiceResponse>;
|
package/dist/gen/models.d.ts
CHANGED
|
@@ -763,6 +763,11 @@ export interface Activity {
|
|
|
763
763
|
*/
|
|
764
764
|
createdAt: string;
|
|
765
765
|
}
|
|
766
|
+
export interface Version {
|
|
767
|
+
id: string;
|
|
768
|
+
name: string;
|
|
769
|
+
description?: string;
|
|
770
|
+
}
|
|
766
771
|
/**
|
|
767
772
|
* The user object represents someone interacting with the bot within a specific integration. The same person interacting with a bot in slack and messenger will be represented with two different users.
|
|
768
773
|
*/
|
|
@@ -1212,11 +1217,11 @@ export interface File {
|
|
|
1212
1217
|
*/
|
|
1213
1218
|
key: string;
|
|
1214
1219
|
/**
|
|
1215
|
-
*
|
|
1220
|
+
* URL to retrieve the file content. This URL will be ready to use once the file is uploaded.
|
|
1216
1221
|
*
|
|
1217
1222
|
* If the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.
|
|
1218
1223
|
*/
|
|
1219
|
-
url: string
|
|
1224
|
+
url: string;
|
|
1220
1225
|
/**
|
|
1221
1226
|
* File size in bytes. Non-null if file upload status is "COMPLETE".
|
|
1222
1227
|
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface CreateBotVersionRequestHeaders {
|
|
2
|
+
}
|
|
3
|
+
export interface CreateBotVersionRequestQuery {
|
|
4
|
+
}
|
|
5
|
+
export interface CreateBotVersionRequestParams {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CreateBotVersionRequestBody {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
export type CreateBotVersionInput = CreateBotVersionRequestBody & CreateBotVersionRequestHeaders & CreateBotVersionRequestQuery & CreateBotVersionRequestParams;
|
|
13
|
+
export type CreateBotVersionRequest = {
|
|
14
|
+
headers: CreateBotVersionRequestHeaders;
|
|
15
|
+
query: CreateBotVersionRequestQuery;
|
|
16
|
+
params: CreateBotVersionRequestParams;
|
|
17
|
+
body: CreateBotVersionRequestBody;
|
|
18
|
+
};
|
|
19
|
+
export declare const parseReq: (input: CreateBotVersionInput) => CreateBotVersionRequest & {
|
|
20
|
+
path: string;
|
|
21
|
+
};
|
|
22
|
+
export interface CreateBotVersionResponse {
|
|
23
|
+
version: {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface DeployBotVersionRequestHeaders {
|
|
2
|
+
}
|
|
3
|
+
export interface DeployBotVersionRequestQuery {
|
|
4
|
+
}
|
|
5
|
+
export interface DeployBotVersionRequestParams {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DeployBotVersionRequestBody {
|
|
9
|
+
versionId: string;
|
|
10
|
+
}
|
|
11
|
+
export type DeployBotVersionInput = DeployBotVersionRequestBody & DeployBotVersionRequestHeaders & DeployBotVersionRequestQuery & DeployBotVersionRequestParams;
|
|
12
|
+
export type DeployBotVersionRequest = {
|
|
13
|
+
headers: DeployBotVersionRequestHeaders;
|
|
14
|
+
query: DeployBotVersionRequestQuery;
|
|
15
|
+
params: DeployBotVersionRequestParams;
|
|
16
|
+
body: DeployBotVersionRequestBody;
|
|
17
|
+
};
|
|
18
|
+
export declare const parseReq: (input: DeployBotVersionInput) => DeployBotVersionRequest & {
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
21
|
+
export interface DeployBotVersionResponse {
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface GetBotVersionRequestHeaders {
|
|
2
|
+
}
|
|
3
|
+
export interface GetBotVersionRequestQuery {
|
|
4
|
+
}
|
|
5
|
+
export interface GetBotVersionRequestParams {
|
|
6
|
+
id: string;
|
|
7
|
+
versionId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetBotVersionRequestBody {
|
|
10
|
+
}
|
|
11
|
+
export type GetBotVersionInput = GetBotVersionRequestBody & GetBotVersionRequestHeaders & GetBotVersionRequestQuery & GetBotVersionRequestParams;
|
|
12
|
+
export type GetBotVersionRequest = {
|
|
13
|
+
headers: GetBotVersionRequestHeaders;
|
|
14
|
+
query: GetBotVersionRequestQuery;
|
|
15
|
+
params: GetBotVersionRequestParams;
|
|
16
|
+
body: GetBotVersionRequestBody;
|
|
17
|
+
};
|
|
18
|
+
export declare const parseReq: (input: GetBotVersionInput) => GetBotVersionRequest & {
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
21
|
+
export interface GetBotVersionResponse {
|
|
22
|
+
url: string;
|
|
23
|
+
}
|
|
@@ -32,11 +32,11 @@ export interface GetFileResponse {
|
|
|
32
32
|
*/
|
|
33
33
|
key: string;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* URL to retrieve the file content. This URL will be ready to use once the file is uploaded.
|
|
36
36
|
*
|
|
37
37
|
* If the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.
|
|
38
38
|
*/
|
|
39
|
-
url: string
|
|
39
|
+
url: string;
|
|
40
40
|
/**
|
|
41
41
|
* File size in bytes. Non-null if file upload status is "COMPLETE".
|
|
42
42
|
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ListBotVersionsRequestHeaders {
|
|
2
|
+
}
|
|
3
|
+
export interface ListBotVersionsRequestQuery {
|
|
4
|
+
}
|
|
5
|
+
export interface ListBotVersionsRequestParams {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ListBotVersionsRequestBody {
|
|
9
|
+
}
|
|
10
|
+
export type ListBotVersionsInput = ListBotVersionsRequestBody & ListBotVersionsRequestHeaders & ListBotVersionsRequestQuery & ListBotVersionsRequestParams;
|
|
11
|
+
export type ListBotVersionsRequest = {
|
|
12
|
+
headers: ListBotVersionsRequestHeaders;
|
|
13
|
+
query: ListBotVersionsRequestQuery;
|
|
14
|
+
params: ListBotVersionsRequestParams;
|
|
15
|
+
body: ListBotVersionsRequestBody;
|
|
16
|
+
};
|
|
17
|
+
export declare const parseReq: (input: ListBotVersionsInput) => ListBotVersionsRequest & {
|
|
18
|
+
path: string;
|
|
19
|
+
};
|
|
20
|
+
export interface ListBotVersionsResponse {
|
|
21
|
+
versions: {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
}[];
|
|
26
|
+
}
|
|
@@ -35,11 +35,11 @@ export interface ListFilesResponse {
|
|
|
35
35
|
*/
|
|
36
36
|
key: string;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* URL to retrieve the file content. This URL will be ready to use once the file is uploaded.
|
|
39
39
|
*
|
|
40
40
|
* If the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.
|
|
41
41
|
*/
|
|
42
|
-
url: string
|
|
42
|
+
url: string;
|
|
43
43
|
/**
|
|
44
44
|
* File size in bytes. Non-null if file upload status is "COMPLETE".
|
|
45
45
|
*/
|
|
@@ -42,11 +42,11 @@ export interface UpdateFileMetadataResponse {
|
|
|
42
42
|
*/
|
|
43
43
|
key: string;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* URL to retrieve the file content. This URL will be ready to use once the file is uploaded.
|
|
46
46
|
*
|
|
47
47
|
* If the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.
|
|
48
48
|
*/
|
|
49
|
-
url: string
|
|
49
|
+
url: string;
|
|
50
50
|
/**
|
|
51
51
|
* File size in bytes. Non-null if file upload status is "COMPLETE".
|
|
52
52
|
*/
|
|
@@ -56,6 +56,12 @@ export interface UpsertFileResponse {
|
|
|
56
56
|
* Unique key for the file. Must be unique across the bot (and the integration, when applicable).
|
|
57
57
|
*/
|
|
58
58
|
key: string;
|
|
59
|
+
/**
|
|
60
|
+
* URL to retrieve the file content. This URL will be ready to use once the file is uploaded.
|
|
61
|
+
*
|
|
62
|
+
* If the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.
|
|
63
|
+
*/
|
|
64
|
+
url: string;
|
|
59
65
|
/**
|
|
60
66
|
* File size in bytes. Non-null if file upload status is "COMPLETE".
|
|
61
67
|
*/
|