@botpress/sdk 3.3.1 → 3.3.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 +4 -4
- package/dist/bot/client/types.d.ts +6 -6
- package/dist/bot/common/generic.d.ts +1 -106
- package/dist/index.mjs +18 -18
- package/dist/index.mjs.map +3 -3
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/sdk@3.3.
|
|
2
|
+
> @botpress/sdk@3.3.2 build /home/runner/work/botpress/botpress/packages/sdk
|
|
3
3
|
> pnpm build:type && pnpm build:node && pnpm build:browser
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/sdk@3.3.
|
|
6
|
+
> @botpress/sdk@3.3.2 build:type /home/runner/work/botpress/botpress/packages/sdk
|
|
7
7
|
> tsc --emitDeclarationOnly --declaration
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/sdk@3.3.
|
|
10
|
+
> @botpress/sdk@3.3.2 build:node /home/runner/work/botpress/botpress/packages/sdk
|
|
11
11
|
> ts-node -T ./build.ts --node
|
|
12
12
|
|
|
13
13
|
Done
|
|
14
14
|
|
|
15
|
-
> @botpress/sdk@3.3.
|
|
15
|
+
> @botpress/sdk@3.3.2 build:browser /home/runner/work/botpress/botpress/packages/sdk
|
|
16
16
|
> ts-node -T ./build.ts --browser
|
|
17
17
|
|
|
18
18
|
Done
|
|
@@ -137,11 +137,11 @@ type TableColumnComparisonFilter<ColumnType> = ColumnType | utils.ExactlyOneProp
|
|
|
137
137
|
}>;
|
|
138
138
|
export type FindTableRows<TBot extends common.BaseBot> = <TableName extends keyof common.EnumerateTables<TBot>, Columns = utils.Cast<common.EnumerateTables<TBot>[TableName], Record<string, any>> & TableRowExtraColumns>(x: utils.Merge<Arg<client.Client['findTableRows']>, {
|
|
139
139
|
table: utils.Cast<TableName, string>;
|
|
140
|
-
filter?: TableRowFilter<TBot, TableName
|
|
141
|
-
group?: utils.AtLeastOneProperty<{
|
|
140
|
+
filter?: TableRowFilter<TBot, NoInfer<TableName>, NoInfer<Columns>>;
|
|
141
|
+
group?: NoInfer<utils.AtLeastOneProperty<{
|
|
142
142
|
[K in Extract<keyof Columns, string>]: TableRowQueryGroup | TableRowQueryGroup[];
|
|
143
|
-
}
|
|
144
|
-
orderBy?: Extract<keyof Columns, string
|
|
143
|
+
}>>;
|
|
144
|
+
orderBy?: NoInfer<Extract<keyof Columns, string>>;
|
|
145
145
|
}>) => Promise<Readonly<utils.Merge<Awaited<Res<client.Client['findTableRows']>>, {
|
|
146
146
|
rows: Awaited<Res<client.Client['findTableRows']>>['rows'] & Columns[];
|
|
147
147
|
}>>>;
|
|
@@ -160,9 +160,9 @@ export type UpdateTableRows<TBot extends common.BaseBot> = <TableName extends ke
|
|
|
160
160
|
export type UpsertTableRows<TBot extends common.BaseBot> = <TableName extends keyof common.EnumerateTables<TBot>, Columns = utils.Cast<common.EnumerateTables<TBot>[TableName], Record<string, any>>>(x: utils.Merge<Arg<client.Client['upsertTableRows']>, {
|
|
161
161
|
table: utils.Cast<TableName, string>;
|
|
162
162
|
rows: utils.AtLeastOne<utils.Cast<common.EnumerateTables<TBot>[TableName], Record<string, any>> & {
|
|
163
|
-
id
|
|
163
|
+
id?: number;
|
|
164
164
|
}>;
|
|
165
|
-
keyColumn?: Extract<keyof common.EnumerateTables<TBot>[TableName], string
|
|
165
|
+
keyColumn?: NoInfer<Extract<keyof common.EnumerateTables<TBot>[TableName], string>> | 'id';
|
|
166
166
|
}>) => Promise<Readonly<utils.Merge<Awaited<Res<client.Client['upsertTableRows']>>, {
|
|
167
167
|
inserted: Awaited<Res<client.Client['upsertTableRows']>>['inserted'] & Columns[];
|
|
168
168
|
updated: Awaited<Res<client.Client['upsertTableRows']>>['updated'] & Columns[];
|
|
@@ -6,112 +6,7 @@ export type BaseAction = {
|
|
|
6
6
|
output: any;
|
|
7
7
|
};
|
|
8
8
|
export type BaseTable = {
|
|
9
|
-
|
|
10
|
-
* Required. This name is used to identify your table.
|
|
11
|
-
*/
|
|
12
|
-
name: string;
|
|
13
|
-
/**
|
|
14
|
-
* The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.
|
|
15
|
-
*/
|
|
16
|
-
factor?: number;
|
|
17
|
-
/**
|
|
18
|
-
* A table designated as "frozen" is immutable in terms of its name and schema structure; modifications to its schema or a renaming operation are not permitted. The only action that can be taken on such a table is deletion. The schema established at the time of creation is locked in as the final structure. To implement any changes, the table must be duplicated with the desired alterations.
|
|
19
|
-
*/
|
|
20
|
-
frozen?: boolean;
|
|
21
|
-
schema: {
|
|
22
|
-
$schema?: string;
|
|
23
|
-
/**
|
|
24
|
-
* List of keys/columns in the table.
|
|
25
|
-
*/
|
|
26
|
-
properties: {
|
|
27
|
-
[k: string]: {
|
|
28
|
-
type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'null';
|
|
29
|
-
format?: 'date-time';
|
|
30
|
-
description?: string;
|
|
31
|
-
/**
|
|
32
|
-
* String properties must match this pattern
|
|
33
|
-
*/
|
|
34
|
-
pattern?: string;
|
|
35
|
-
/**
|
|
36
|
-
* String properties must be one of these values
|
|
37
|
-
*/
|
|
38
|
-
enum?: string[];
|
|
39
|
-
/**
|
|
40
|
-
* Defines the shape of items in an array
|
|
41
|
-
*/
|
|
42
|
-
items?: {
|
|
43
|
-
type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'null';
|
|
44
|
-
[k: string]: any;
|
|
45
|
-
};
|
|
46
|
-
nullable?: boolean;
|
|
47
|
-
properties?: {
|
|
48
|
-
[k: string]: {
|
|
49
|
-
type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'null';
|
|
50
|
-
[k: string]: any;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
'x-zui': {
|
|
54
|
-
index: number;
|
|
55
|
-
/**
|
|
56
|
-
* Indicates if the column is vectorized and searchable.
|
|
57
|
-
*/
|
|
58
|
-
searchable?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Indicates if the field is hidden in the UI
|
|
61
|
-
*/
|
|
62
|
-
hidden?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Order of the column in the UI
|
|
65
|
-
*/
|
|
66
|
-
order?: number;
|
|
67
|
-
/**
|
|
68
|
-
* Width of the column in the UI
|
|
69
|
-
*/
|
|
70
|
-
width?: number;
|
|
71
|
-
computed?: {
|
|
72
|
-
action: 'ai' | 'code' | 'workflow';
|
|
73
|
-
dependencies?: string[];
|
|
74
|
-
/**
|
|
75
|
-
* Prompt when action is "ai"
|
|
76
|
-
*/
|
|
77
|
-
prompt?: string;
|
|
78
|
-
/**
|
|
79
|
-
* Code to execute when action is "code"
|
|
80
|
-
*/
|
|
81
|
-
code?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Model to use when action is "ai"
|
|
84
|
-
*/
|
|
85
|
-
model?: string;
|
|
86
|
-
/**
|
|
87
|
-
* ID of Workflow to execute when action is "workflow"
|
|
88
|
-
*/
|
|
89
|
-
workflowId?: string;
|
|
90
|
-
enabled?: boolean;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* Additional properties can be provided, but they will be ignored if no column matches.
|
|
97
|
-
*/
|
|
98
|
-
additionalProperties: true;
|
|
99
|
-
/**
|
|
100
|
-
* Array of required properties.
|
|
101
|
-
*/
|
|
102
|
-
required?: string[];
|
|
103
|
-
type: 'object';
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs.
|
|
107
|
-
*/
|
|
108
|
-
tags?: {
|
|
109
|
-
[k: string]: string;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Indicates if the table is enabled for computation.
|
|
113
|
-
*/
|
|
114
|
-
isComputeEnabled?: boolean;
|
|
9
|
+
[k: string]: any;
|
|
115
10
|
};
|
|
116
11
|
export type BaseBot = {
|
|
117
12
|
integrations: Record<string, BaseIntegration>;
|