@chatbotkit/cli 1.8.0 → 1.9.1

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.
Files changed (45) hide show
  1. package/README.md +1 -0
  2. package/bin/cbk.js +7 -0
  3. package/dist/cjs/command/api/conversation/index.cjs +9 -4
  4. package/dist/cjs/command/api/conversation/message/index.cjs +9 -4
  5. package/dist/cjs/command/api/dataset/index.cjs +9 -4
  6. package/dist/cjs/command/api/partner/user/index.cjs +9 -4
  7. package/dist/cjs/command/api/skillset/index.cjs +9 -4
  8. package/dist/cjs/command/chat/index.cjs +7 -4
  9. package/dist/cjs/command/solution/index.cjs +53 -0
  10. package/dist/cjs/command/solution/index.d.ts +7 -0
  11. package/dist/cjs/command/solution/resource/index.cjs +44 -0
  12. package/dist/cjs/command/solution/resource/index.d.ts +5 -0
  13. package/dist/cjs/index.cjs +4 -2
  14. package/dist/cjs/index.d.ts +1 -1
  15. package/dist/cjs/input.cjs +18 -0
  16. package/dist/cjs/input.d.ts +1 -0
  17. package/dist/cjs/output.cjs +10 -2
  18. package/dist/cjs/output.d.ts +2 -0
  19. package/dist/cjs/proxy.cjs +22 -0
  20. package/dist/cjs/proxy.d.ts +7 -0
  21. package/dist/cjs/solution/index.cjs +325 -0
  22. package/dist/cjs/solution/index.d.ts +822 -0
  23. package/dist/esm/command/api/conversation/index.js +9 -4
  24. package/dist/esm/command/api/conversation/message/index.js +9 -4
  25. package/dist/esm/command/api/dataset/index.js +9 -4
  26. package/dist/esm/command/api/partner/user/index.js +9 -4
  27. package/dist/esm/command/api/skillset/index.js +9 -4
  28. package/dist/esm/command/chat/index.js +7 -4
  29. package/dist/esm/command/solution/index.d.ts +7 -0
  30. package/dist/esm/command/solution/index.js +49 -0
  31. package/dist/esm/command/solution/resource/index.d.ts +5 -0
  32. package/dist/esm/command/solution/resource/index.js +40 -0
  33. package/dist/esm/index.d.ts +1 -1
  34. package/dist/esm/index.js +4 -2
  35. package/dist/esm/input.d.ts +1 -0
  36. package/dist/esm/input.js +13 -0
  37. package/dist/esm/output.d.ts +2 -0
  38. package/dist/esm/output.js +8 -1
  39. package/dist/esm/proxy.d.ts +7 -0
  40. package/dist/esm/proxy.js +17 -0
  41. package/dist/esm/solution/index.d.ts +822 -0
  42. package/dist/esm/solution/index.js +307 -0
  43. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  44. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  45. package/package.json +135 -2
@@ -0,0 +1,822 @@
1
+ export function getSolutionFolderPath(): string;
2
+ export function getSolutionFileName(name: string): string;
3
+ export function getSolutionFilePath(name: string): string;
4
+ export function getSolutionFileNameAndPath(name: string): {
5
+ fileName: string;
6
+ filePath: string;
7
+ };
8
+ export function replaceEnvVars(value: any): any;
9
+ export function getArrayBackedObject<T>(array: T[]): {
10
+ [key: string]: T;
11
+ };
12
+ export const BasicResourceConfigSchema: z.ZodObject<{
13
+ type: z.ZodString;
14
+ slug: z.ZodOptional<z.ZodString>;
15
+ id: z.ZodOptional<z.ZodString>;
16
+ name: z.ZodString;
17
+ description: z.ZodOptional<z.ZodString>;
18
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ type?: string;
21
+ slug?: string;
22
+ id?: string;
23
+ name?: string;
24
+ description?: string;
25
+ properties?: Record<string, unknown>;
26
+ }, {
27
+ type?: string;
28
+ slug?: string;
29
+ id?: string;
30
+ name?: string;
31
+ description?: string;
32
+ properties?: Record<string, unknown>;
33
+ }>;
34
+ export const BotResourceConfigSchema: z.ZodObject<{
35
+ slug: z.ZodOptional<z.ZodString>;
36
+ id: z.ZodOptional<z.ZodString>;
37
+ name: z.ZodString;
38
+ description: z.ZodOptional<z.ZodString>;
39
+ type: z.ZodLiteral<"bot">;
40
+ properties: z.ZodObject<{
41
+ model: z.ZodOptional<z.ZodString>;
42
+ backstory: z.ZodOptional<z.ZodString>;
43
+ datasetId: z.ZodOptional<z.ZodString>;
44
+ skillsetId: z.ZodOptional<z.ZodString>;
45
+ moderation: z.ZodOptional<z.ZodBoolean>;
46
+ privacy: z.ZodOptional<z.ZodBoolean>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ model?: string;
49
+ backstory?: string;
50
+ datasetId?: string;
51
+ skillsetId?: string;
52
+ moderation?: boolean;
53
+ privacy?: boolean;
54
+ }, {
55
+ model?: string;
56
+ backstory?: string;
57
+ datasetId?: string;
58
+ skillsetId?: string;
59
+ moderation?: boolean;
60
+ privacy?: boolean;
61
+ }>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ slug?: string;
64
+ id?: string;
65
+ name?: string;
66
+ description?: string;
67
+ type?: "bot";
68
+ properties?: {
69
+ model?: string;
70
+ backstory?: string;
71
+ datasetId?: string;
72
+ skillsetId?: string;
73
+ moderation?: boolean;
74
+ privacy?: boolean;
75
+ };
76
+ }, {
77
+ slug?: string;
78
+ id?: string;
79
+ name?: string;
80
+ description?: string;
81
+ type?: "bot";
82
+ properties?: {
83
+ model?: string;
84
+ backstory?: string;
85
+ datasetId?: string;
86
+ skillsetId?: string;
87
+ moderation?: boolean;
88
+ privacy?: boolean;
89
+ };
90
+ }>;
91
+ export const DatasetResourceConfigSchema: z.ZodObject<{
92
+ slug: z.ZodOptional<z.ZodString>;
93
+ id: z.ZodOptional<z.ZodString>;
94
+ name: z.ZodString;
95
+ description: z.ZodOptional<z.ZodString>;
96
+ type: z.ZodLiteral<"dataset">;
97
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ slug?: string;
100
+ id?: string;
101
+ name?: string;
102
+ description?: string;
103
+ type?: "dataset";
104
+ properties?: {};
105
+ }, {
106
+ slug?: string;
107
+ id?: string;
108
+ name?: string;
109
+ description?: string;
110
+ type?: "dataset";
111
+ properties?: {};
112
+ }>;
113
+ export const SkillsetResourceConfigSchema: z.ZodObject<{
114
+ slug: z.ZodOptional<z.ZodString>;
115
+ id: z.ZodOptional<z.ZodString>;
116
+ name: z.ZodString;
117
+ description: z.ZodOptional<z.ZodString>;
118
+ type: z.ZodLiteral<"skillset">;
119
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ slug?: string;
122
+ id?: string;
123
+ name?: string;
124
+ description?: string;
125
+ type?: "skillset";
126
+ properties?: {};
127
+ }, {
128
+ slug?: string;
129
+ id?: string;
130
+ name?: string;
131
+ description?: string;
132
+ type?: "skillset";
133
+ properties?: {};
134
+ }>;
135
+ export const WidgetIntegrationResourceConfigSchema: z.ZodObject<{
136
+ slug: z.ZodOptional<z.ZodString>;
137
+ id: z.ZodOptional<z.ZodString>;
138
+ name: z.ZodString;
139
+ description: z.ZodOptional<z.ZodString>;
140
+ type: z.ZodLiteral<"widgetIntegration">;
141
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ slug?: string;
144
+ id?: string;
145
+ name?: string;
146
+ description?: string;
147
+ type?: "widgetIntegration";
148
+ properties?: {};
149
+ }, {
150
+ slug?: string;
151
+ id?: string;
152
+ name?: string;
153
+ description?: string;
154
+ type?: "widgetIntegration";
155
+ properties?: {};
156
+ }>;
157
+ export const SitemapIntegrationResourceConfigSchema: z.ZodObject<{
158
+ slug: z.ZodOptional<z.ZodString>;
159
+ id: z.ZodOptional<z.ZodString>;
160
+ name: z.ZodString;
161
+ description: z.ZodOptional<z.ZodString>;
162
+ type: z.ZodLiteral<"sitemapIntegration">;
163
+ properties: z.ZodObject<{
164
+ url: z.ZodString;
165
+ datasetId: z.ZodString;
166
+ }, "strip", z.ZodTypeAny, {
167
+ url?: string;
168
+ datasetId?: string;
169
+ }, {
170
+ url?: string;
171
+ datasetId?: string;
172
+ }>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ slug?: string;
175
+ id?: string;
176
+ name?: string;
177
+ description?: string;
178
+ type?: "sitemapIntegration";
179
+ properties?: {
180
+ url?: string;
181
+ datasetId?: string;
182
+ };
183
+ }, {
184
+ slug?: string;
185
+ id?: string;
186
+ name?: string;
187
+ description?: string;
188
+ type?: "sitemapIntegration";
189
+ properties?: {
190
+ url?: string;
191
+ datasetId?: string;
192
+ };
193
+ }>;
194
+ export const ResourceConfigSchema: z.ZodUnion<[z.ZodObject<{
195
+ slug: z.ZodOptional<z.ZodString>;
196
+ id: z.ZodOptional<z.ZodString>;
197
+ name: z.ZodString;
198
+ description: z.ZodOptional<z.ZodString>;
199
+ type: z.ZodLiteral<"bot">;
200
+ properties: z.ZodObject<{
201
+ model: z.ZodOptional<z.ZodString>;
202
+ backstory: z.ZodOptional<z.ZodString>;
203
+ datasetId: z.ZodOptional<z.ZodString>;
204
+ skillsetId: z.ZodOptional<z.ZodString>;
205
+ moderation: z.ZodOptional<z.ZodBoolean>;
206
+ privacy: z.ZodOptional<z.ZodBoolean>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ model?: string;
209
+ backstory?: string;
210
+ datasetId?: string;
211
+ skillsetId?: string;
212
+ moderation?: boolean;
213
+ privacy?: boolean;
214
+ }, {
215
+ model?: string;
216
+ backstory?: string;
217
+ datasetId?: string;
218
+ skillsetId?: string;
219
+ moderation?: boolean;
220
+ privacy?: boolean;
221
+ }>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ slug?: string;
224
+ id?: string;
225
+ name?: string;
226
+ description?: string;
227
+ type?: "bot";
228
+ properties?: {
229
+ model?: string;
230
+ backstory?: string;
231
+ datasetId?: string;
232
+ skillsetId?: string;
233
+ moderation?: boolean;
234
+ privacy?: boolean;
235
+ };
236
+ }, {
237
+ slug?: string;
238
+ id?: string;
239
+ name?: string;
240
+ description?: string;
241
+ type?: "bot";
242
+ properties?: {
243
+ model?: string;
244
+ backstory?: string;
245
+ datasetId?: string;
246
+ skillsetId?: string;
247
+ moderation?: boolean;
248
+ privacy?: boolean;
249
+ };
250
+ }>, z.ZodObject<{
251
+ slug: z.ZodOptional<z.ZodString>;
252
+ id: z.ZodOptional<z.ZodString>;
253
+ name: z.ZodString;
254
+ description: z.ZodOptional<z.ZodString>;
255
+ type: z.ZodLiteral<"dataset">;
256
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
257
+ }, "strip", z.ZodTypeAny, {
258
+ slug?: string;
259
+ id?: string;
260
+ name?: string;
261
+ description?: string;
262
+ type?: "dataset";
263
+ properties?: {};
264
+ }, {
265
+ slug?: string;
266
+ id?: string;
267
+ name?: string;
268
+ description?: string;
269
+ type?: "dataset";
270
+ properties?: {};
271
+ }>, z.ZodObject<{
272
+ slug: z.ZodOptional<z.ZodString>;
273
+ id: z.ZodOptional<z.ZodString>;
274
+ name: z.ZodString;
275
+ description: z.ZodOptional<z.ZodString>;
276
+ type: z.ZodLiteral<"skillset">;
277
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
278
+ }, "strip", z.ZodTypeAny, {
279
+ slug?: string;
280
+ id?: string;
281
+ name?: string;
282
+ description?: string;
283
+ type?: "skillset";
284
+ properties?: {};
285
+ }, {
286
+ slug?: string;
287
+ id?: string;
288
+ name?: string;
289
+ description?: string;
290
+ type?: "skillset";
291
+ properties?: {};
292
+ }>, z.ZodObject<{
293
+ slug: z.ZodOptional<z.ZodString>;
294
+ id: z.ZodOptional<z.ZodString>;
295
+ name: z.ZodString;
296
+ description: z.ZodOptional<z.ZodString>;
297
+ type: z.ZodLiteral<"widgetIntegration">;
298
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
299
+ }, "strip", z.ZodTypeAny, {
300
+ slug?: string;
301
+ id?: string;
302
+ name?: string;
303
+ description?: string;
304
+ type?: "widgetIntegration";
305
+ properties?: {};
306
+ }, {
307
+ slug?: string;
308
+ id?: string;
309
+ name?: string;
310
+ description?: string;
311
+ type?: "widgetIntegration";
312
+ properties?: {};
313
+ }>, z.ZodObject<{
314
+ slug: z.ZodOptional<z.ZodString>;
315
+ id: z.ZodOptional<z.ZodString>;
316
+ name: z.ZodString;
317
+ description: z.ZodOptional<z.ZodString>;
318
+ type: z.ZodLiteral<"sitemapIntegration">;
319
+ properties: z.ZodObject<{
320
+ url: z.ZodString;
321
+ datasetId: z.ZodString;
322
+ }, "strip", z.ZodTypeAny, {
323
+ url?: string;
324
+ datasetId?: string;
325
+ }, {
326
+ url?: string;
327
+ datasetId?: string;
328
+ }>;
329
+ }, "strip", z.ZodTypeAny, {
330
+ slug?: string;
331
+ id?: string;
332
+ name?: string;
333
+ description?: string;
334
+ type?: "sitemapIntegration";
335
+ properties?: {
336
+ url?: string;
337
+ datasetId?: string;
338
+ };
339
+ }, {
340
+ slug?: string;
341
+ id?: string;
342
+ name?: string;
343
+ description?: string;
344
+ type?: "sitemapIntegration";
345
+ properties?: {
346
+ url?: string;
347
+ datasetId?: string;
348
+ };
349
+ }>]>;
350
+ export const SolutionConfigSchema: z.ZodObject<{
351
+ version: z.ZodLiteral<1>;
352
+ resources: z.ZodArray<z.ZodUnion<[z.ZodObject<{
353
+ slug: z.ZodOptional<z.ZodString>;
354
+ id: z.ZodOptional<z.ZodString>;
355
+ name: z.ZodString;
356
+ description: z.ZodOptional<z.ZodString>;
357
+ type: z.ZodLiteral<"bot">;
358
+ properties: z.ZodObject<{
359
+ model: z.ZodOptional<z.ZodString>;
360
+ backstory: z.ZodOptional<z.ZodString>;
361
+ datasetId: z.ZodOptional<z.ZodString>;
362
+ skillsetId: z.ZodOptional<z.ZodString>;
363
+ moderation: z.ZodOptional<z.ZodBoolean>;
364
+ privacy: z.ZodOptional<z.ZodBoolean>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ model?: string;
367
+ backstory?: string;
368
+ datasetId?: string;
369
+ skillsetId?: string;
370
+ moderation?: boolean;
371
+ privacy?: boolean;
372
+ }, {
373
+ model?: string;
374
+ backstory?: string;
375
+ datasetId?: string;
376
+ skillsetId?: string;
377
+ moderation?: boolean;
378
+ privacy?: boolean;
379
+ }>;
380
+ }, "strip", z.ZodTypeAny, {
381
+ slug?: string;
382
+ id?: string;
383
+ name?: string;
384
+ description?: string;
385
+ type?: "bot";
386
+ properties?: {
387
+ model?: string;
388
+ backstory?: string;
389
+ datasetId?: string;
390
+ skillsetId?: string;
391
+ moderation?: boolean;
392
+ privacy?: boolean;
393
+ };
394
+ }, {
395
+ slug?: string;
396
+ id?: string;
397
+ name?: string;
398
+ description?: string;
399
+ type?: "bot";
400
+ properties?: {
401
+ model?: string;
402
+ backstory?: string;
403
+ datasetId?: string;
404
+ skillsetId?: string;
405
+ moderation?: boolean;
406
+ privacy?: boolean;
407
+ };
408
+ }>, z.ZodObject<{
409
+ slug: z.ZodOptional<z.ZodString>;
410
+ id: z.ZodOptional<z.ZodString>;
411
+ name: z.ZodString;
412
+ description: z.ZodOptional<z.ZodString>;
413
+ type: z.ZodLiteral<"dataset">;
414
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
415
+ }, "strip", z.ZodTypeAny, {
416
+ slug?: string;
417
+ id?: string;
418
+ name?: string;
419
+ description?: string;
420
+ type?: "dataset";
421
+ properties?: {};
422
+ }, {
423
+ slug?: string;
424
+ id?: string;
425
+ name?: string;
426
+ description?: string;
427
+ type?: "dataset";
428
+ properties?: {};
429
+ }>, z.ZodObject<{
430
+ slug: z.ZodOptional<z.ZodString>;
431
+ id: z.ZodOptional<z.ZodString>;
432
+ name: z.ZodString;
433
+ description: z.ZodOptional<z.ZodString>;
434
+ type: z.ZodLiteral<"skillset">;
435
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
436
+ }, "strip", z.ZodTypeAny, {
437
+ slug?: string;
438
+ id?: string;
439
+ name?: string;
440
+ description?: string;
441
+ type?: "skillset";
442
+ properties?: {};
443
+ }, {
444
+ slug?: string;
445
+ id?: string;
446
+ name?: string;
447
+ description?: string;
448
+ type?: "skillset";
449
+ properties?: {};
450
+ }>, z.ZodObject<{
451
+ slug: z.ZodOptional<z.ZodString>;
452
+ id: z.ZodOptional<z.ZodString>;
453
+ name: z.ZodString;
454
+ description: z.ZodOptional<z.ZodString>;
455
+ type: z.ZodLiteral<"widgetIntegration">;
456
+ properties: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
457
+ }, "strip", z.ZodTypeAny, {
458
+ slug?: string;
459
+ id?: string;
460
+ name?: string;
461
+ description?: string;
462
+ type?: "widgetIntegration";
463
+ properties?: {};
464
+ }, {
465
+ slug?: string;
466
+ id?: string;
467
+ name?: string;
468
+ description?: string;
469
+ type?: "widgetIntegration";
470
+ properties?: {};
471
+ }>, z.ZodObject<{
472
+ slug: z.ZodOptional<z.ZodString>;
473
+ id: z.ZodOptional<z.ZodString>;
474
+ name: z.ZodString;
475
+ description: z.ZodOptional<z.ZodString>;
476
+ type: z.ZodLiteral<"sitemapIntegration">;
477
+ properties: z.ZodObject<{
478
+ url: z.ZodString;
479
+ datasetId: z.ZodString;
480
+ }, "strip", z.ZodTypeAny, {
481
+ url?: string;
482
+ datasetId?: string;
483
+ }, {
484
+ url?: string;
485
+ datasetId?: string;
486
+ }>;
487
+ }, "strip", z.ZodTypeAny, {
488
+ slug?: string;
489
+ id?: string;
490
+ name?: string;
491
+ description?: string;
492
+ type?: "sitemapIntegration";
493
+ properties?: {
494
+ url?: string;
495
+ datasetId?: string;
496
+ };
497
+ }, {
498
+ slug?: string;
499
+ id?: string;
500
+ name?: string;
501
+ description?: string;
502
+ type?: "sitemapIntegration";
503
+ properties?: {
504
+ url?: string;
505
+ datasetId?: string;
506
+ };
507
+ }>]>, "many">;
508
+ }, "strip", z.ZodTypeAny, {
509
+ version?: 1;
510
+ resources?: ({
511
+ slug?: string;
512
+ id?: string;
513
+ name?: string;
514
+ description?: string;
515
+ type?: "bot";
516
+ properties?: {
517
+ model?: string;
518
+ backstory?: string;
519
+ datasetId?: string;
520
+ skillsetId?: string;
521
+ moderation?: boolean;
522
+ privacy?: boolean;
523
+ };
524
+ } | {
525
+ slug?: string;
526
+ id?: string;
527
+ name?: string;
528
+ description?: string;
529
+ type?: "dataset";
530
+ properties?: {};
531
+ } | {
532
+ slug?: string;
533
+ id?: string;
534
+ name?: string;
535
+ description?: string;
536
+ type?: "skillset";
537
+ properties?: {};
538
+ } | {
539
+ slug?: string;
540
+ id?: string;
541
+ name?: string;
542
+ description?: string;
543
+ type?: "widgetIntegration";
544
+ properties?: {};
545
+ } | {
546
+ slug?: string;
547
+ id?: string;
548
+ name?: string;
549
+ description?: string;
550
+ type?: "sitemapIntegration";
551
+ properties?: {
552
+ url?: string;
553
+ datasetId?: string;
554
+ };
555
+ })[];
556
+ }, {
557
+ version?: 1;
558
+ resources?: ({
559
+ slug?: string;
560
+ id?: string;
561
+ name?: string;
562
+ description?: string;
563
+ type?: "bot";
564
+ properties?: {
565
+ model?: string;
566
+ backstory?: string;
567
+ datasetId?: string;
568
+ skillsetId?: string;
569
+ moderation?: boolean;
570
+ privacy?: boolean;
571
+ };
572
+ } | {
573
+ slug?: string;
574
+ id?: string;
575
+ name?: string;
576
+ description?: string;
577
+ type?: "dataset";
578
+ properties?: {};
579
+ } | {
580
+ slug?: string;
581
+ id?: string;
582
+ name?: string;
583
+ description?: string;
584
+ type?: "skillset";
585
+ properties?: {};
586
+ } | {
587
+ slug?: string;
588
+ id?: string;
589
+ name?: string;
590
+ description?: string;
591
+ type?: "widgetIntegration";
592
+ properties?: {};
593
+ } | {
594
+ slug?: string;
595
+ id?: string;
596
+ name?: string;
597
+ description?: string;
598
+ type?: "sitemapIntegration";
599
+ properties?: {
600
+ url?: string;
601
+ datasetId?: string;
602
+ };
603
+ })[];
604
+ }>;
605
+ export class Resource {
606
+ constructor(config: ResourceConfig);
607
+ config: {
608
+ slug?: string;
609
+ id?: string;
610
+ name?: string;
611
+ description?: string;
612
+ type?: "bot";
613
+ properties?: {
614
+ model?: string;
615
+ backstory?: string;
616
+ datasetId?: string;
617
+ skillsetId?: string;
618
+ moderation?: boolean;
619
+ privacy?: boolean;
620
+ };
621
+ } | {
622
+ slug?: string;
623
+ id?: string;
624
+ name?: string;
625
+ description?: string;
626
+ type?: "dataset";
627
+ properties?: {};
628
+ } | {
629
+ slug?: string;
630
+ id?: string;
631
+ name?: string;
632
+ description?: string;
633
+ type?: "skillset";
634
+ properties?: {};
635
+ } | {
636
+ slug?: string;
637
+ id?: string;
638
+ name?: string;
639
+ description?: string;
640
+ type?: "widgetIntegration";
641
+ properties?: {};
642
+ } | {
643
+ slug?: string;
644
+ id?: string;
645
+ name?: string;
646
+ description?: string;
647
+ type?: "sitemapIntegration";
648
+ properties?: {
649
+ url?: string;
650
+ datasetId?: string;
651
+ };
652
+ };
653
+ get type(): string;
654
+ get slug(): string;
655
+ get id(): string;
656
+ get name(): string;
657
+ get description(): string;
658
+ get baseClient(): ChatBotKit;
659
+ get client(): {
660
+ create: (properties: Record<string, any>) => Promise<{
661
+ id: string;
662
+ }>;
663
+ update: (id: string, properties: Record<string, any>) => Promise<{
664
+ id: string;
665
+ }>;
666
+ };
667
+ sync(): Promise<void>;
668
+ }
669
+ export class BotResource extends Resource {
670
+ override get client(): import("@chatbotkit/sdk").BotClient;
671
+ }
672
+ export class DatasetResource extends Resource {
673
+ override get client(): import("@chatbotkit/sdk").DatasetClient;
674
+ }
675
+ export class SkillsetResource extends Resource {
676
+ override get client(): import("@chatbotkit/sdk").SkillsetClient;
677
+ }
678
+ export class WidgetIntegrationResource extends Resource {
679
+ override get client(): any;
680
+ }
681
+ export class SitemapIntegrationResource extends Resource {
682
+ get client(): any;
683
+ }
684
+ export class Solution {
685
+ constructor(config: SolutionConfig);
686
+ config: {
687
+ version?: 1;
688
+ resources?: ({
689
+ slug?: string;
690
+ id?: string;
691
+ name?: string;
692
+ description?: string;
693
+ type?: "bot";
694
+ properties?: {
695
+ model?: string;
696
+ backstory?: string;
697
+ datasetId?: string;
698
+ skillsetId?: string;
699
+ moderation?: boolean;
700
+ privacy?: boolean;
701
+ };
702
+ } | {
703
+ slug?: string;
704
+ id?: string;
705
+ name?: string;
706
+ description?: string;
707
+ type?: "dataset";
708
+ properties?: {};
709
+ } | {
710
+ slug?: string;
711
+ id?: string;
712
+ name?: string;
713
+ description?: string;
714
+ type?: "skillset";
715
+ properties?: {};
716
+ } | {
717
+ slug?: string;
718
+ id?: string;
719
+ name?: string;
720
+ description?: string;
721
+ type?: "widgetIntegration";
722
+ properties?: {};
723
+ } | {
724
+ slug?: string;
725
+ id?: string;
726
+ name?: string;
727
+ description?: string;
728
+ type?: "sitemapIntegration";
729
+ properties?: {
730
+ url?: string;
731
+ datasetId?: string;
732
+ };
733
+ })[];
734
+ };
735
+ get baseClient(): ChatBotKit;
736
+ get resources(): (BotResource | DatasetResource | SkillsetResource | WidgetIntegrationResource | SitemapIntegrationResource)[];
737
+ get bots(): BotResource[];
738
+ get bot(): {
739
+ [key: string]: BotResource;
740
+ };
741
+ get datasets(): DatasetResource[];
742
+ get dataset(): {
743
+ [key: string]: DatasetResource;
744
+ };
745
+ get skillsets(): SkillsetResource[];
746
+ get skillset(): {
747
+ [key: string]: SkillsetResource;
748
+ };
749
+ get widgetIntegrations(): WidgetIntegrationResource[];
750
+ get widgetIntegration(): {
751
+ [key: string]: WidgetIntegrationResource;
752
+ };
753
+ get sitemapIntegrations(): SitemapIntegrationResource[];
754
+ get sitemapIntegration(): {
755
+ [key: string]: SitemapIntegrationResource;
756
+ };
757
+ sync(): Promise<void>;
758
+ }
759
+ export namespace Solution {
760
+ export function list(): Promise<string[]>;
761
+ export function create(name: string): Promise<void>;
762
+ function _delete(name: string): Promise<void>;
763
+ export { _delete as delete };
764
+ export function load(config: string | {
765
+ version?: 1;
766
+ resources?: ({
767
+ slug?: string;
768
+ id?: string;
769
+ name?: string;
770
+ description?: string;
771
+ type?: "bot";
772
+ properties?: {
773
+ model?: string;
774
+ backstory?: string;
775
+ datasetId?: string;
776
+ skillsetId?: string;
777
+ moderation?: boolean;
778
+ privacy?: boolean;
779
+ };
780
+ } | {
781
+ slug?: string;
782
+ id?: string;
783
+ name?: string;
784
+ description?: string;
785
+ type?: "dataset";
786
+ properties?: {};
787
+ } | {
788
+ slug?: string;
789
+ id?: string;
790
+ name?: string;
791
+ description?: string;
792
+ type?: "skillset";
793
+ properties?: {};
794
+ } | {
795
+ slug?: string;
796
+ id?: string;
797
+ name?: string;
798
+ description?: string;
799
+ type?: "widgetIntegration";
800
+ properties?: {};
801
+ } | {
802
+ slug?: string;
803
+ id?: string;
804
+ name?: string;
805
+ description?: string;
806
+ type?: "sitemapIntegration";
807
+ properties?: {
808
+ url?: string;
809
+ datasetId?: string;
810
+ };
811
+ })[];
812
+ }): Promise<Solution>;
813
+ export function save(name: string, solution: Solution): Promise<void>;
814
+ }
815
+ export class ArrayBackedObject<T> {
816
+ constructor(array: T[]);
817
+ array: T[];
818
+ }
819
+ export type SolutionConfig = z.infer<typeof SolutionConfigSchema>;
820
+ export type ResourceConfig = z.infer<typeof ResourceConfigSchema>;
821
+ import { z } from 'zod';
822
+ import ChatBotKit from '@chatbotkit/sdk';