@botpress/sdk 0.8.29 → 0.8.31

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.
@@ -0,0 +1,131 @@
1
+ import { InterfaceDeclaration } from '../integration/definition';
2
+ export declare const listable: InterfaceDeclaration<{
3
+ item: import("@bpinternal/zui").ZodObject<{
4
+ id: import("@bpinternal/zui").ZodString;
5
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
6
+ id: string;
7
+ }, {
8
+ id: string;
9
+ }>;
10
+ }, {
11
+ list: import("@bpinternal/zui").ZodObject<{
12
+ nextToken: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
13
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
14
+ nextToken?: string | undefined;
15
+ }, {
16
+ nextToken?: string | undefined;
17
+ }>;
18
+ }, import("../integration/definition/generic").BaseEvents>;
19
+ export declare const creatable: InterfaceDeclaration<{
20
+ item: import("@bpinternal/zui").ZodObject<{
21
+ id: import("@bpinternal/zui").ZodString;
22
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
23
+ id: string;
24
+ }, {
25
+ id: string;
26
+ }>;
27
+ }, {
28
+ create: import("@bpinternal/zui").ZodObject<{
29
+ item: import("@bpinternal/zui").ZodRef;
30
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
31
+ item: {};
32
+ }, {
33
+ item: {};
34
+ }>;
35
+ }, {
36
+ created: import("@bpinternal/zui").ZodObject<{
37
+ item: import("@bpinternal/zui").ZodIntersection<import("@bpinternal/zui").ZodTypeAny, import("@bpinternal/zui").ZodObject<{
38
+ id: import("@bpinternal/zui").ZodString;
39
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
40
+ id: string;
41
+ }, {
42
+ id: string;
43
+ }>>;
44
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
45
+ item?: any;
46
+ }, {
47
+ item?: any;
48
+ }>;
49
+ }>;
50
+ export declare const readable: InterfaceDeclaration<{
51
+ item: import("@bpinternal/zui").ZodObject<{
52
+ id: import("@bpinternal/zui").ZodString;
53
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
54
+ id: string;
55
+ }, {
56
+ id: string;
57
+ }>;
58
+ }, {
59
+ read: import("@bpinternal/zui").ZodObject<{
60
+ id: import("@bpinternal/zui").ZodString;
61
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
62
+ id: string;
63
+ }, {
64
+ id: string;
65
+ }>;
66
+ }, import("../integration/definition/generic").BaseEvents>;
67
+ export declare const updatable: InterfaceDeclaration<{
68
+ item: import("@bpinternal/zui").ZodObject<{
69
+ id: import("@bpinternal/zui").ZodString;
70
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
71
+ id: string;
72
+ }, {
73
+ id: string;
74
+ }>;
75
+ }, {
76
+ update: import("@bpinternal/zui").ZodObject<{
77
+ id: import("@bpinternal/zui").ZodString;
78
+ item: import("@bpinternal/zui").ZodRef;
79
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
80
+ id: string;
81
+ item: {};
82
+ }, {
83
+ id: string;
84
+ item: {};
85
+ }>;
86
+ }, {
87
+ updated: import("@bpinternal/zui").ZodObject<{
88
+ item: import("@bpinternal/zui").ZodIntersection<import("@bpinternal/zui").ZodTypeAny, import("@bpinternal/zui").ZodObject<{
89
+ id: import("@bpinternal/zui").ZodString;
90
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
91
+ id: string;
92
+ }, {
93
+ id: string;
94
+ }>>;
95
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
96
+ item?: any;
97
+ }, {
98
+ item?: any;
99
+ }>;
100
+ }>;
101
+ export declare const deletable: InterfaceDeclaration<{
102
+ item: import("@bpinternal/zui").ZodObject<{
103
+ id: import("@bpinternal/zui").ZodString;
104
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
105
+ id: string;
106
+ }, {
107
+ id: string;
108
+ }>;
109
+ }, {
110
+ delete: import("@bpinternal/zui").ZodObject<{
111
+ id: import("@bpinternal/zui").ZodString;
112
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
113
+ id: string;
114
+ }, {
115
+ id: string;
116
+ }>;
117
+ }, {
118
+ deleted: import("@bpinternal/zui").ZodObject<{
119
+ item: import("@bpinternal/zui").ZodIntersection<import("@bpinternal/zui").ZodTypeAny, import("@bpinternal/zui").ZodObject<{
120
+ id: import("@bpinternal/zui").ZodString;
121
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
122
+ id: string;
123
+ }, {
124
+ id: string;
125
+ }>>;
126
+ }, "strip", import("@bpinternal/zui").ZodTypeAny, {
127
+ item?: any;
128
+ }, {
129
+ item?: any;
130
+ }>;
131
+ }>;
@@ -9,6 +9,9 @@ export type Join<S extends (string | number | symbol)[]> = S extends [infer H, .
9
9
  export type Split<S extends string | number | symbol, D extends string> = S extends `${infer H}${D}${infer T}` ? [H, ...Split<Cast<T, string>, D>] : [S];
10
10
  export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
11
11
  export type ValueOf<T> = T[keyof T];
12
+ export type Writable<T> = {
13
+ -readonly [K in keyof T]: T[K];
14
+ };
12
15
  export type Inspect<T> = {
13
16
  [K in keyof T]: T[K];
14
17
  };
@@ -0,0 +1,3 @@
1
+ export declare const pairs: <K extends string, V>(obj: Record<K, V>) => [K, V][];
2
+ export declare const values: <K extends string, V>(obj: Record<K, V>) => V[];
3
+ export declare const mapValues: <K extends string, V, R>(obj: Record<K, V>, fn: (value: V, key: K) => R) => Record<K, R>;
package/dist/zui.d.ts CHANGED
@@ -337,4 +337,5 @@ export declare const studioComponentDefinitions: {
337
337
  readonly discriminatedUnion: {};
338
338
  };
339
339
  export type UI<Namespace extends 'studio' | 'dashboard' = 'studio'> = Namespace extends 'studio' ? typeof studioComponentDefinitions : Namespace extends 'dashboard' ? DefaultComponentDefinitions : any;
340
+ export type GenericZuiSchema<A extends Record<string, z.ZodTypeAny> = Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny = z.ZodTypeAny> = (typeArguments: A) => R;
340
341
  export default z;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/sdk",
3
- "version": "0.8.29",
3
+ "version": "0.8.31",
4
4
  "description": "Botpress SDK",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "author": "",
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "@bpinternal/zui": "0.8.6",
17
+ "@bpinternal/zui": "0.9.1",
18
18
  "@botpress/client": "0.23.1"
19
19
  },
20
20
  "devDependencies": {