@kl1/contracts 1.1.27 → 1.1.28

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,547 @@
1
+ import z from 'zod';
2
+ import { CreateBotpressBotSchema } from './schema';
3
+ import { BotCredentials, CreateBotSchema, SendBotpressMessageSchema } from './validation';
4
+ export type CreateBotRequest = z.infer<typeof CreateBotSchema>;
5
+ export type BotCredentialsType = z.infer<typeof BotCredentials>;
6
+ export type CreateBotpressbotRequest = z.infer<typeof CreateBotpressBotSchema>;
7
+ export type SendBotpressMessageRequest = z.infer<typeof SendBotpressMessageSchema>;
8
+ export declare const botpressContract: {
9
+ createBot: {
10
+ body: z.ZodObject<{
11
+ actor: z.ZodObject<{
12
+ id: z.ZodString;
13
+ name: z.ZodString;
14
+ email: z.ZodString;
15
+ address: z.ZodNullable<z.ZodString>;
16
+ phone: z.ZodNullable<z.ZodString>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ id: string;
19
+ address: string | null;
20
+ name: string;
21
+ email: string;
22
+ phone: string | null;
23
+ }, {
24
+ id: string;
25
+ address: string | null;
26
+ name: string;
27
+ email: string;
28
+ phone: string | null;
29
+ }>;
30
+ botCredentials: z.ZodObject<{
31
+ botId: z.ZodString;
32
+ integrationId: z.ZodString;
33
+ accessToken: z.ZodString;
34
+ }, "strip", z.ZodTypeAny, {
35
+ accessToken: string;
36
+ botId: string;
37
+ integrationId: string;
38
+ }, {
39
+ accessToken: string;
40
+ botId: string;
41
+ integrationId: string;
42
+ }>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ actor: {
45
+ id: string;
46
+ address: string | null;
47
+ name: string;
48
+ email: string;
49
+ phone: string | null;
50
+ };
51
+ botCredentials: {
52
+ accessToken: string;
53
+ botId: string;
54
+ integrationId: string;
55
+ };
56
+ }, {
57
+ actor: {
58
+ id: string;
59
+ address: string | null;
60
+ name: string;
61
+ email: string;
62
+ phone: string | null;
63
+ };
64
+ botCredentials: {
65
+ accessToken: string;
66
+ botId: string;
67
+ integrationId: string;
68
+ };
69
+ }>;
70
+ method: "POST";
71
+ responses: {
72
+ 200: z.ZodObject<{
73
+ requestId: z.ZodString;
74
+ data: z.ZodObject<{
75
+ id: z.ZodString;
76
+ name: z.ZodString;
77
+ botId: z.ZodString;
78
+ integrationId: z.ZodString;
79
+ accessToken: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ id: string;
82
+ name: string;
83
+ accessToken: string;
84
+ botId: string;
85
+ integrationId: string;
86
+ }, {
87
+ id: string;
88
+ name: string;
89
+ accessToken: string;
90
+ botId: string;
91
+ integrationId: string;
92
+ }>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ data: {
95
+ id: string;
96
+ name: string;
97
+ accessToken: string;
98
+ botId: string;
99
+ integrationId: string;
100
+ };
101
+ requestId: string;
102
+ }, {
103
+ data: {
104
+ id: string;
105
+ name: string;
106
+ accessToken: string;
107
+ botId: string;
108
+ integrationId: string;
109
+ };
110
+ requestId: string;
111
+ }>;
112
+ 400: z.ZodObject<{
113
+ message: z.ZodString;
114
+ error: z.ZodAny;
115
+ }, "strip", z.ZodTypeAny, {
116
+ message: string;
117
+ error?: any;
118
+ }, {
119
+ message: string;
120
+ error?: any;
121
+ }>;
122
+ 500: z.ZodObject<{
123
+ message: z.ZodString;
124
+ error: z.ZodAny;
125
+ }, "strip", z.ZodTypeAny, {
126
+ message: string;
127
+ error?: any;
128
+ }, {
129
+ message: string;
130
+ error?: any;
131
+ }>;
132
+ };
133
+ path: "/bots/";
134
+ };
135
+ getBots: {
136
+ method: "GET";
137
+ responses: {
138
+ 200: z.ZodObject<{
139
+ requestId: z.ZodString;
140
+ data: z.ZodArray<z.ZodObject<{
141
+ id: z.ZodString;
142
+ name: z.ZodString;
143
+ botId: z.ZodString;
144
+ integrationId: z.ZodString;
145
+ accessToken: z.ZodString;
146
+ }, "strip", z.ZodTypeAny, {
147
+ id: string;
148
+ name: string;
149
+ accessToken: string;
150
+ botId: string;
151
+ integrationId: string;
152
+ }, {
153
+ id: string;
154
+ name: string;
155
+ accessToken: string;
156
+ botId: string;
157
+ integrationId: string;
158
+ }>, "many">;
159
+ }, "strip", z.ZodTypeAny, {
160
+ data: {
161
+ id: string;
162
+ name: string;
163
+ accessToken: string;
164
+ botId: string;
165
+ integrationId: string;
166
+ }[];
167
+ requestId: string;
168
+ }, {
169
+ data: {
170
+ id: string;
171
+ name: string;
172
+ accessToken: string;
173
+ botId: string;
174
+ integrationId: string;
175
+ }[];
176
+ requestId: string;
177
+ }>;
178
+ 500: z.ZodObject<{
179
+ message: z.ZodString;
180
+ error: z.ZodAny;
181
+ }, "strip", z.ZodTypeAny, {
182
+ message: string;
183
+ error?: any;
184
+ }, {
185
+ message: string;
186
+ error?: any;
187
+ }>;
188
+ };
189
+ path: "/bots/";
190
+ };
191
+ sendMessage: {
192
+ body: z.ZodObject<{
193
+ message: z.ZodOptional<z.ZodString>;
194
+ type: z.ZodString;
195
+ room: z.ZodObject<{
196
+ botpressConversationMetadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
197
+ id: z.ZodString;
198
+ }, "strip", z.ZodTypeAny, {
199
+ id: string;
200
+ }, {
201
+ id: string;
202
+ }>>>;
203
+ id: z.ZodString;
204
+ channel: z.ZodObject<{
205
+ id: z.ZodString;
206
+ botpressBotId: z.ZodString;
207
+ type: z.ZodString;
208
+ metadata: z.ZodObject<{
209
+ accessToken: z.ZodString;
210
+ }, "strip", z.ZodTypeAny, {
211
+ accessToken: string;
212
+ }, {
213
+ accessToken: string;
214
+ }>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ type: string;
217
+ id: string;
218
+ metadata: {
219
+ accessToken: string;
220
+ };
221
+ botpressBotId: string;
222
+ }, {
223
+ type: string;
224
+ id: string;
225
+ metadata: {
226
+ accessToken: string;
227
+ };
228
+ botpressBotId: string;
229
+ }>;
230
+ platformContact: z.ZodObject<{
231
+ id: z.ZodString;
232
+ socialPlatformId: z.ZodString;
233
+ contact: z.ZodObject<{
234
+ name: z.ZodString;
235
+ }, "strip", z.ZodTypeAny, {
236
+ name: string;
237
+ }, {
238
+ name: string;
239
+ }>;
240
+ botpressUserMetadata: z.ZodNullable<z.ZodArray<z.ZodObject<{
241
+ botpressBotId: z.ZodString;
242
+ id: z.ZodString;
243
+ name: z.ZodString;
244
+ }, "strip", z.ZodTypeAny, {
245
+ id: string;
246
+ name: string;
247
+ botpressBotId: string;
248
+ }, {
249
+ id: string;
250
+ name: string;
251
+ botpressBotId: string;
252
+ }>, "many">>;
253
+ }, "strip", z.ZodTypeAny, {
254
+ id: string;
255
+ contact: {
256
+ name: string;
257
+ };
258
+ socialPlatformId: string;
259
+ botpressUserMetadata: {
260
+ id: string;
261
+ name: string;
262
+ botpressBotId: string;
263
+ }[] | null;
264
+ }, {
265
+ id: string;
266
+ contact: {
267
+ name: string;
268
+ };
269
+ socialPlatformId: string;
270
+ botpressUserMetadata: {
271
+ id: string;
272
+ name: string;
273
+ botpressBotId: string;
274
+ }[] | null;
275
+ }>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ id: string;
278
+ channel: {
279
+ type: string;
280
+ id: string;
281
+ metadata: {
282
+ accessToken: string;
283
+ };
284
+ botpressBotId: string;
285
+ };
286
+ platformContact: {
287
+ id: string;
288
+ contact: {
289
+ name: string;
290
+ };
291
+ socialPlatformId: string;
292
+ botpressUserMetadata: {
293
+ id: string;
294
+ name: string;
295
+ botpressBotId: string;
296
+ }[] | null;
297
+ };
298
+ botpressConversationMetadata?: {
299
+ id: string;
300
+ } | null | undefined;
301
+ }, {
302
+ id: string;
303
+ channel: {
304
+ type: string;
305
+ id: string;
306
+ metadata: {
307
+ accessToken: string;
308
+ };
309
+ botpressBotId: string;
310
+ };
311
+ platformContact: {
312
+ id: string;
313
+ contact: {
314
+ name: string;
315
+ };
316
+ socialPlatformId: string;
317
+ botpressUserMetadata: {
318
+ id: string;
319
+ name: string;
320
+ botpressBotId: string;
321
+ }[] | null;
322
+ };
323
+ botpressConversationMetadata?: {
324
+ id: string;
325
+ } | null | undefined;
326
+ }>;
327
+ }, "strip", z.ZodTypeAny, {
328
+ type: string;
329
+ room: {
330
+ id: string;
331
+ channel: {
332
+ type: string;
333
+ id: string;
334
+ metadata: {
335
+ accessToken: string;
336
+ };
337
+ botpressBotId: string;
338
+ };
339
+ platformContact: {
340
+ id: string;
341
+ contact: {
342
+ name: string;
343
+ };
344
+ socialPlatformId: string;
345
+ botpressUserMetadata: {
346
+ id: string;
347
+ name: string;
348
+ botpressBotId: string;
349
+ }[] | null;
350
+ };
351
+ botpressConversationMetadata?: {
352
+ id: string;
353
+ } | null | undefined;
354
+ };
355
+ message?: string | undefined;
356
+ }, {
357
+ type: string;
358
+ room: {
359
+ id: string;
360
+ channel: {
361
+ type: string;
362
+ id: string;
363
+ metadata: {
364
+ accessToken: string;
365
+ };
366
+ botpressBotId: string;
367
+ };
368
+ platformContact: {
369
+ id: string;
370
+ contact: {
371
+ name: string;
372
+ };
373
+ socialPlatformId: string;
374
+ botpressUserMetadata: {
375
+ id: string;
376
+ name: string;
377
+ botpressBotId: string;
378
+ }[] | null;
379
+ };
380
+ botpressConversationMetadata?: {
381
+ id: string;
382
+ } | null | undefined;
383
+ };
384
+ message?: string | undefined;
385
+ }>;
386
+ method: "POST";
387
+ responses: {
388
+ 200: z.ZodObject<{
389
+ requestId: z.ZodString;
390
+ }, "strip", z.ZodTypeAny, {
391
+ requestId: string;
392
+ }, {
393
+ requestId: string;
394
+ }>;
395
+ 500: z.ZodObject<{
396
+ message: z.ZodString;
397
+ error: z.ZodAny;
398
+ }, "strip", z.ZodTypeAny, {
399
+ message: string;
400
+ error?: any;
401
+ }, {
402
+ message: string;
403
+ error?: any;
404
+ }>;
405
+ };
406
+ path: "/bots/send-message";
407
+ };
408
+ };
409
+ export declare const botContract: {
410
+ createBot: {
411
+ body: z.ZodObject<{
412
+ botId: z.ZodString;
413
+ integrationId: z.ZodString;
414
+ accessToken: z.ZodString;
415
+ }, "strip", z.ZodTypeAny, {
416
+ accessToken: string;
417
+ botId: string;
418
+ integrationId: string;
419
+ }, {
420
+ accessToken: string;
421
+ botId: string;
422
+ integrationId: string;
423
+ }>;
424
+ summary: "Create bot for the given tenant";
425
+ method: "POST";
426
+ responses: {
427
+ 200: z.ZodObject<{
428
+ requestId: z.ZodString;
429
+ data: z.ZodObject<{
430
+ id: z.ZodString;
431
+ name: z.ZodString;
432
+ botId: z.ZodString;
433
+ integrationId: z.ZodString;
434
+ accessToken: z.ZodString;
435
+ }, "strip", z.ZodTypeAny, {
436
+ id: string;
437
+ name: string;
438
+ accessToken: string;
439
+ botId: string;
440
+ integrationId: string;
441
+ }, {
442
+ id: string;
443
+ name: string;
444
+ accessToken: string;
445
+ botId: string;
446
+ integrationId: string;
447
+ }>;
448
+ }, "strip", z.ZodTypeAny, {
449
+ data: {
450
+ id: string;
451
+ name: string;
452
+ accessToken: string;
453
+ botId: string;
454
+ integrationId: string;
455
+ };
456
+ requestId: string;
457
+ }, {
458
+ data: {
459
+ id: string;
460
+ name: string;
461
+ accessToken: string;
462
+ botId: string;
463
+ integrationId: string;
464
+ };
465
+ requestId: string;
466
+ }>;
467
+ 400: z.ZodObject<{
468
+ message: z.ZodString;
469
+ error: z.ZodAny;
470
+ }, "strip", z.ZodTypeAny, {
471
+ message: string;
472
+ error?: any;
473
+ }, {
474
+ message: string;
475
+ error?: any;
476
+ }>;
477
+ 500: z.ZodObject<{
478
+ message: z.ZodString;
479
+ error: z.ZodAny;
480
+ }, "strip", z.ZodTypeAny, {
481
+ message: string;
482
+ error?: any;
483
+ }, {
484
+ message: string;
485
+ error?: any;
486
+ }>;
487
+ };
488
+ path: "/bots/";
489
+ };
490
+ getBots: {
491
+ method: "GET";
492
+ responses: {
493
+ 200: z.ZodObject<{
494
+ requestId: z.ZodString;
495
+ data: z.ZodArray<z.ZodObject<{
496
+ id: z.ZodString;
497
+ name: z.ZodString;
498
+ botId: z.ZodString;
499
+ integrationId: z.ZodString;
500
+ accessToken: z.ZodString;
501
+ }, "strip", z.ZodTypeAny, {
502
+ id: string;
503
+ name: string;
504
+ accessToken: string;
505
+ botId: string;
506
+ integrationId: string;
507
+ }, {
508
+ id: string;
509
+ name: string;
510
+ accessToken: string;
511
+ botId: string;
512
+ integrationId: string;
513
+ }>, "many">;
514
+ }, "strip", z.ZodTypeAny, {
515
+ data: {
516
+ id: string;
517
+ name: string;
518
+ accessToken: string;
519
+ botId: string;
520
+ integrationId: string;
521
+ }[];
522
+ requestId: string;
523
+ }, {
524
+ data: {
525
+ id: string;
526
+ name: string;
527
+ accessToken: string;
528
+ botId: string;
529
+ integrationId: string;
530
+ }[];
531
+ requestId: string;
532
+ }>;
533
+ 500: z.ZodObject<{
534
+ message: z.ZodString;
535
+ error: z.ZodAny;
536
+ }, "strip", z.ZodTypeAny, {
537
+ message: string;
538
+ error?: any;
539
+ }, {
540
+ message: string;
541
+ error?: any;
542
+ }>;
543
+ };
544
+ path: "/bots/";
545
+ };
546
+ };
547
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/botpress/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EACL,cAAc,EACd,eAAe,EACf,yBAAyB,EAC1B,MAAM,cAAc,CAAC;AAOtB,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAChE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC/E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,yBAAyB,CACjC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC5B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BvB,CAAC"}
@@ -0,0 +1,81 @@
1
+ import z from 'zod';
2
+ export declare const CreateBotpressBotSchema: z.ZodObject<{
3
+ actor: z.ZodObject<{
4
+ id: z.ZodString;
5
+ name: z.ZodString;
6
+ email: z.ZodString;
7
+ address: z.ZodNullable<z.ZodString>;
8
+ phone: z.ZodNullable<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ id: string;
11
+ address: string | null;
12
+ name: string;
13
+ email: string;
14
+ phone: string | null;
15
+ }, {
16
+ id: string;
17
+ address: string | null;
18
+ name: string;
19
+ email: string;
20
+ phone: string | null;
21
+ }>;
22
+ botCredentials: z.ZodObject<{
23
+ botId: z.ZodString;
24
+ integrationId: z.ZodString;
25
+ accessToken: z.ZodString;
26
+ }, "strip", z.ZodTypeAny, {
27
+ accessToken: string;
28
+ botId: string;
29
+ integrationId: string;
30
+ }, {
31
+ accessToken: string;
32
+ botId: string;
33
+ integrationId: string;
34
+ }>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ actor: {
37
+ id: string;
38
+ address: string | null;
39
+ name: string;
40
+ email: string;
41
+ phone: string | null;
42
+ };
43
+ botCredentials: {
44
+ accessToken: string;
45
+ botId: string;
46
+ integrationId: string;
47
+ };
48
+ }, {
49
+ actor: {
50
+ id: string;
51
+ address: string | null;
52
+ name: string;
53
+ email: string;
54
+ phone: string | null;
55
+ };
56
+ botCredentials: {
57
+ accessToken: string;
58
+ botId: string;
59
+ integrationId: string;
60
+ };
61
+ }>;
62
+ export declare const BotpressBotSchema: z.ZodObject<{
63
+ id: z.ZodString;
64
+ name: z.ZodString;
65
+ botId: z.ZodString;
66
+ integrationId: z.ZodString;
67
+ accessToken: z.ZodString;
68
+ }, "strip", z.ZodTypeAny, {
69
+ id: string;
70
+ name: string;
71
+ accessToken: string;
72
+ botId: string;
73
+ integrationId: string;
74
+ }, {
75
+ id: string;
76
+ name: string;
77
+ accessToken: string;
78
+ botId: string;
79
+ integrationId: string;
80
+ }>;
81
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/botpress/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASlC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAM5B,CAAC"}