@chatbotkit/cli 1.23.0 → 1.25.0

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ArrayBackedObject = exports.Solution = exports.SitemapIntegrationResource = exports.WidgetIntegrationResource = exports.SkillsetResource = exports.DatasetResource = exports.BotResource = exports.Resource = exports.SolutionConfigSchema = exports.ResourceConfigSchema = exports.SitemapIntegrationResourceConfigSchema = exports.WidgetIntegrationResourceConfigSchema = exports.SkillsetResourceConfigSchema = exports.DatasetResourceConfigSchema = exports.BotResourceConfigSchema = exports.BasicResourceConfigSchema = void 0;
3
+ exports.ArrayBackedObject = exports.Solution = exports.TwilioIntegrationResource = exports.McpServerIntegrationResource = exports.ExtractIntegrationResource = exports.SupportIntegrationResource = exports.TriggerIntegrationResource = exports.EmailIntegrationResource = exports.NotionIntegrationResource = exports.MessengerIntegrationResource = exports.WhatsAppIntegrationResource = exports.TelegramIntegrationResource = exports.DiscordIntegrationResource = exports.SlackIntegrationResource = exports.SitemapIntegrationResource = exports.WidgetIntegrationResource = exports.SkillsetResource = exports.SecretResource = exports.FileResource = exports.DatasetResource = exports.BotResource = exports.BlueprintResource = exports.Resource = exports.SolutionConfigSchema = exports.ResourceConfigSchema = exports.TwilioIntegrationResourceConfigSchema = exports.McpServerIntegrationResourceConfigSchema = exports.ExtractIntegrationResourceConfigSchema = exports.SupportIntegrationResourceConfigSchema = exports.TriggerIntegrationResourceConfigSchema = exports.EmailIntegrationResourceConfigSchema = exports.NotionIntegrationResourceConfigSchema = exports.MessengerIntegrationResourceConfigSchema = exports.WhatsAppIntegrationResourceConfigSchema = exports.TelegramIntegrationResourceConfigSchema = exports.DiscordIntegrationResourceConfigSchema = exports.SlackIntegrationResourceConfigSchema = exports.SitemapIntegrationResourceConfigSchema = exports.WidgetIntegrationResourceConfigSchema = exports.SkillsetResourceConfigSchema = exports.SecretResourceConfigSchema = exports.FileResourceConfigSchema = exports.DatasetResourceConfigSchema = exports.BotResourceConfigSchema = exports.BlueprintResourceConfigSchema = exports.BasicResourceConfigSchema = void 0;
4
4
  exports.getSolutionFolderPath = getSolutionFolderPath;
5
5
  exports.getSolutionFileName = getSolutionFileName;
6
6
  exports.getSolutionFilePath = getSolutionFilePath;
@@ -54,49 +54,342 @@ function replaceEnvVars(value) {
54
54
  return value;
55
55
  }
56
56
  exports.BasicResourceConfigSchema = zod_1.z.object({
57
- type: zod_1.z.string(),
58
57
  slug: zod_1.z.string().optional(),
59
58
  id: zod_1.z.string().optional(),
60
- name: zod_1.z.string(),
61
- description: zod_1.z.string().optional(),
62
- properties: zod_1.z.record(zod_1.z.unknown()),
59
+ });
60
+ exports.BlueprintResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
61
+ type: zod_1.z.literal('blueprint'),
62
+ properties: zod_1.z.object({
63
+ name: zod_1.z.string().optional(),
64
+ description: zod_1.z.string().optional(),
65
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
66
+ visibility: zod_1.z.enum(['private', 'protected', 'public']).optional(),
67
+ }),
63
68
  });
64
69
  exports.BotResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
65
70
  type: zod_1.z.literal('bot'),
66
71
  properties: zod_1.z.object({
72
+ name: zod_1.z.string().optional(),
73
+ description: zod_1.z.string().optional(),
74
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
67
75
  model: zod_1.z.string().optional(),
68
76
  backstory: zod_1.z.string().optional(),
69
77
  datasetId: zod_1.z.string().optional(),
70
78
  skillsetId: zod_1.z.string().optional(),
71
79
  moderation: zod_1.z.boolean().optional(),
72
80
  privacy: zod_1.z.boolean().optional(),
81
+ blueprintId: zod_1.z.string().optional(),
82
+ visibility: zod_1.z.enum(['private', 'protected', 'public']).optional(),
73
83
  }),
74
84
  });
75
85
  exports.DatasetResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
76
86
  type: zod_1.z.literal('dataset'),
77
- properties: zod_1.z.object({}),
87
+ properties: zod_1.z.object({
88
+ name: zod_1.z.string().optional(),
89
+ description: zod_1.z.string().optional(),
90
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
91
+ blueprintId: zod_1.z.string().optional(),
92
+ store: zod_1.z.string().optional(),
93
+ reranker: zod_1.z.string().optional(),
94
+ recordMaxTokens: zod_1.z.number().optional(),
95
+ searchMinScore: zod_1.z.number().optional(),
96
+ searchMaxRecords: zod_1.z.number().optional(),
97
+ searchMaxTokens: zod_1.z.number().optional(),
98
+ matchInstruction: zod_1.z.string().optional(),
99
+ mismatchInstruction: zod_1.z.string().optional(),
100
+ separators: zod_1.z.string().optional(),
101
+ visibility: zod_1.z.enum(['private', 'protected', 'public']).optional(),
102
+ }),
103
+ });
104
+ exports.FileResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
105
+ type: zod_1.z.literal('file'),
106
+ properties: zod_1.z.object({
107
+ name: zod_1.z.string().optional(),
108
+ description: zod_1.z.string().optional(),
109
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
110
+ blueprintId: zod_1.z.string().optional(),
111
+ visibility: zod_1.z.enum(['private', 'protected', 'public']).optional(),
112
+ }),
113
+ });
114
+ exports.SecretResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
115
+ type: zod_1.z.literal('secret'),
116
+ properties: zod_1.z.object({
117
+ name: zod_1.z.string().optional(),
118
+ description: zod_1.z.string().optional(),
119
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
120
+ blueprintId: zod_1.z.string().optional(),
121
+ kind: zod_1.z.enum(['shared', 'personal']).optional(),
122
+ type: zod_1.z
123
+ .enum(['plain', 'basic', 'bearer', 'oauth', 'template', 'reference'])
124
+ .optional(),
125
+ value: zod_1.z.string().optional(),
126
+ config: zod_1.z.record(zod_1.z.unknown()).optional(),
127
+ visibility: zod_1.z.enum(['private', 'protected', 'public']).optional(),
128
+ }),
78
129
  });
79
130
  exports.SkillsetResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
80
131
  type: zod_1.z.literal('skillset'),
81
- properties: zod_1.z.object({}),
132
+ properties: zod_1.z.object({
133
+ name: zod_1.z.string().optional(),
134
+ description: zod_1.z.string().optional(),
135
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
136
+ blueprintId: zod_1.z.string().optional(),
137
+ visibility: zod_1.z.enum(['private', 'protected', 'public']).optional(),
138
+ }),
82
139
  });
83
140
  exports.WidgetIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
84
141
  type: zod_1.z.literal('widgetIntegration'),
85
- properties: zod_1.z.object({}),
142
+ properties: zod_1.z.object({
143
+ name: zod_1.z.string().optional(),
144
+ description: zod_1.z.string().optional(),
145
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
146
+ blueprintId: zod_1.z.string().optional(),
147
+ botId: zod_1.z.string().optional(),
148
+ theme: zod_1.z.string().optional(),
149
+ layout: zod_1.z.string().optional(),
150
+ title: zod_1.z.string().optional(),
151
+ intro: zod_1.z.string().optional(),
152
+ initial: zod_1.z.string().optional(),
153
+ placeholder: zod_1.z.string().optional(),
154
+ origin: zod_1.z.string().optional(),
155
+ sessionDuration: zod_1.z.number().optional(),
156
+ language: zod_1.z.string().optional(),
157
+ plugins: zod_1.z.string().optional(),
158
+ stream: zod_1.z.boolean().optional(),
159
+ verbose: zod_1.z.boolean().optional(),
160
+ tools: zod_1.z.boolean().optional(),
161
+ unfurl: zod_1.z.boolean().optional(),
162
+ math: zod_1.z.boolean().optional(),
163
+ carousel: zod_1.z.boolean().optional(),
164
+ form: zod_1.z.boolean().optional(),
165
+ attachments: zod_1.z.boolean().optional(),
166
+ autoScroll: zod_1.z.boolean().optional(),
167
+ startFirst: zod_1.z.boolean().optional(),
168
+ contactCollection: zod_1.z.boolean().optional(),
169
+ exportConversation: zod_1.z.boolean().optional(),
170
+ restartConversation: zod_1.z.boolean().optional(),
171
+ maximize: zod_1.z.boolean().optional(),
172
+ messagePeek: zod_1.z.boolean().optional(),
173
+ voiceIn: zod_1.z.boolean().optional(),
174
+ voiceOut: zod_1.z.boolean().optional(),
175
+ poweredBy: zod_1.z.boolean().optional(),
176
+ }),
86
177
  });
87
178
  exports.SitemapIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
88
179
  type: zod_1.z.literal('sitemapIntegration'),
89
180
  properties: zod_1.z.object({
90
- url: zod_1.z.string().url(),
91
- datasetId: zod_1.z.string(),
181
+ name: zod_1.z.string().optional(),
182
+ description: zod_1.z.string().optional(),
183
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
184
+ url: zod_1.z.string().optional(),
185
+ glob: zod_1.z.string().optional(),
186
+ datasetId: zod_1.z.string().optional(),
187
+ blueprintId: zod_1.z.string().optional(),
188
+ selectors: zod_1.z.string().optional(),
189
+ expiresIn: zod_1.z.number().optional(),
190
+ javascript: zod_1.z.boolean().optional(),
191
+ syncSchedule: zod_1.z.string().optional(),
192
+ }),
193
+ });
194
+ exports.SlackIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
195
+ type: zod_1.z.literal('slackIntegration'),
196
+ properties: zod_1.z.object({
197
+ name: zod_1.z.string().optional(),
198
+ description: zod_1.z.string().optional(),
199
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
200
+ blueprintId: zod_1.z.string().optional(),
201
+ botId: zod_1.z.string().optional(),
202
+ signingSecret: zod_1.z.string().optional(),
203
+ botToken: zod_1.z.string().optional(),
204
+ userToken: zod_1.z.string().optional(),
205
+ contactCollection: zod_1.z.boolean().optional(),
206
+ sessionDuration: zod_1.z.number().optional(),
207
+ attachments: zod_1.z.boolean().optional(),
208
+ references: zod_1.z.boolean().optional(),
209
+ ratings: zod_1.z.boolean().optional(),
210
+ visibleMessages: zod_1.z.number().optional(),
211
+ autoRespond: zod_1.z.string().optional(),
212
+ }),
213
+ });
214
+ exports.DiscordIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
215
+ type: zod_1.z.literal('discordIntegration'),
216
+ properties: zod_1.z.object({
217
+ name: zod_1.z.string().optional(),
218
+ description: zod_1.z.string().optional(),
219
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
220
+ blueprintId: zod_1.z.string().optional(),
221
+ botId: zod_1.z.string().optional(),
222
+ appId: zod_1.z.string().optional(),
223
+ botToken: zod_1.z.string().optional(),
224
+ publicKey: zod_1.z.string().optional(),
225
+ handle: zod_1.z.string().optional(),
226
+ ephemeral: zod_1.z.boolean().optional(),
227
+ contactCollection: zod_1.z.boolean().optional(),
228
+ sessionDuration: zod_1.z.number().optional(),
229
+ attachments: zod_1.z.boolean().optional(),
230
+ stream: zod_1.z.boolean().optional(),
231
+ }),
232
+ });
233
+ exports.TelegramIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
234
+ type: zod_1.z.literal('telegramIntegration'),
235
+ properties: zod_1.z.object({
236
+ name: zod_1.z.string().optional(),
237
+ description: zod_1.z.string().optional(),
238
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
239
+ blueprintId: zod_1.z.string().optional(),
240
+ botId: zod_1.z.string().optional(),
241
+ botToken: zod_1.z.string().optional(),
242
+ contactCollection: zod_1.z.boolean().optional(),
243
+ sessionDuration: zod_1.z.number().optional(),
244
+ attachments: zod_1.z.boolean().optional(),
245
+ }),
246
+ });
247
+ exports.WhatsAppIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
248
+ type: zod_1.z.literal('whatsappIntegration'),
249
+ properties: zod_1.z.object({
250
+ name: zod_1.z.string().optional(),
251
+ description: zod_1.z.string().optional(),
252
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
253
+ blueprintId: zod_1.z.string().optional(),
254
+ botId: zod_1.z.string().optional(),
255
+ phoneNumberId: zod_1.z.string().optional(),
256
+ accessToken: zod_1.z.string().optional(),
257
+ contactCollection: zod_1.z.boolean().optional(),
258
+ sessionDuration: zod_1.z.number().optional(),
259
+ attachments: zod_1.z.boolean().optional(),
260
+ }),
261
+ });
262
+ exports.MessengerIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
263
+ type: zod_1.z.literal('messengerIntegration'),
264
+ properties: zod_1.z.object({
265
+ name: zod_1.z.string().optional(),
266
+ description: zod_1.z.string().optional(),
267
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
268
+ blueprintId: zod_1.z.string().optional(),
269
+ botId: zod_1.z.string().optional(),
270
+ accessToken: zod_1.z.string().optional(),
271
+ contactCollection: zod_1.z.boolean().optional(),
272
+ sessionDuration: zod_1.z.number().optional(),
273
+ attachments: zod_1.z.boolean().optional(),
274
+ }),
275
+ });
276
+ exports.NotionIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
277
+ type: zod_1.z.literal('notionIntegration'),
278
+ properties: zod_1.z.object({
279
+ name: zod_1.z.string().optional(),
280
+ description: zod_1.z.string().optional(),
281
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
282
+ blueprintId: zod_1.z.string().optional(),
283
+ datasetId: zod_1.z.string().optional(),
284
+ token: zod_1.z.string().optional(),
285
+ syncSchedule: zod_1.z.string().optional(),
286
+ expiresIn: zod_1.z.number().optional(),
287
+ }),
288
+ });
289
+ exports.EmailIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
290
+ type: zod_1.z.literal('emailIntegration'),
291
+ properties: zod_1.z.object({
292
+ name: zod_1.z.string().optional(),
293
+ description: zod_1.z.string().optional(),
294
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
295
+ blueprintId: zod_1.z.string().optional(),
296
+ botId: zod_1.z.string().optional(),
297
+ contactCollection: zod_1.z.boolean().optional(),
298
+ sessionDuration: zod_1.z.number().optional(),
299
+ attachments: zod_1.z.boolean().optional(),
300
+ }),
301
+ });
302
+ exports.TriggerIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
303
+ type: zod_1.z.literal('triggerIntegration'),
304
+ properties: zod_1.z.object({
305
+ name: zod_1.z.string().optional(),
306
+ description: zod_1.z.string().optional(),
307
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
308
+ blueprintId: zod_1.z.string().optional(),
309
+ botId: zod_1.z.string().optional(),
310
+ authenticate: zod_1.z.boolean().optional(),
311
+ triggerSchedule: zod_1.z
312
+ .enum([
313
+ 'never',
314
+ 'quarterhourly',
315
+ 'halfhourly',
316
+ 'hourly',
317
+ 'daily',
318
+ 'weekly',
319
+ 'monthly',
320
+ ])
321
+ .optional(),
322
+ sessionDuration: zod_1.z.number().optional(),
323
+ }),
324
+ });
325
+ exports.SupportIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
326
+ type: zod_1.z.literal('supportIntegration'),
327
+ properties: zod_1.z.object({
328
+ name: zod_1.z.string().optional(),
329
+ description: zod_1.z.string().optional(),
330
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
331
+ blueprintId: zod_1.z.string().optional(),
332
+ botId: zod_1.z.string().optional(),
333
+ email: zod_1.z.string().optional(),
334
+ trigger: zod_1.z.string().optional(),
335
+ }),
336
+ });
337
+ exports.ExtractIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
338
+ type: zod_1.z.literal('extractIntegration'),
339
+ properties: zod_1.z.object({
340
+ name: zod_1.z.string().optional(),
341
+ description: zod_1.z.string().optional(),
342
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
343
+ blueprintId: zod_1.z.string().optional(),
344
+ botId: zod_1.z.string().optional(),
345
+ schema: zod_1.z.record(zod_1.z.unknown()).optional(),
346
+ request: zod_1.z.string().optional(),
347
+ trigger: zod_1.z.string().optional(),
348
+ }),
349
+ });
350
+ exports.McpServerIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
351
+ type: zod_1.z.literal('mcpserverIntegration'),
352
+ properties: zod_1.z.object({
353
+ name: zod_1.z.string().optional(),
354
+ description: zod_1.z.string().optional(),
355
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
356
+ blueprintId: zod_1.z.string().optional(),
357
+ skillsetId: zod_1.z.string().optional(),
358
+ }),
359
+ });
360
+ exports.TwilioIntegrationResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
361
+ type: zod_1.z.literal('twilioIntegration'),
362
+ properties: zod_1.z.object({
363
+ name: zod_1.z.string().optional(),
364
+ description: zod_1.z.string().optional(),
365
+ meta: zod_1.z.record(zod_1.z.unknown()).optional(),
366
+ blueprintId: zod_1.z.string().optional(),
367
+ botId: zod_1.z.string().optional(),
368
+ contactCollection: zod_1.z.boolean().optional(),
369
+ sessionDuration: zod_1.z.number().optional(),
92
370
  }),
93
371
  });
94
372
  exports.ResourceConfigSchema = zod_1.z.union([
373
+ exports.BlueprintResourceConfigSchema,
95
374
  exports.BotResourceConfigSchema,
96
375
  exports.DatasetResourceConfigSchema,
376
+ exports.FileResourceConfigSchema,
377
+ exports.SecretResourceConfigSchema,
97
378
  exports.SkillsetResourceConfigSchema,
98
379
  exports.WidgetIntegrationResourceConfigSchema,
99
380
  exports.SitemapIntegrationResourceConfigSchema,
381
+ exports.SlackIntegrationResourceConfigSchema,
382
+ exports.DiscordIntegrationResourceConfigSchema,
383
+ exports.TelegramIntegrationResourceConfigSchema,
384
+ exports.WhatsAppIntegrationResourceConfigSchema,
385
+ exports.MessengerIntegrationResourceConfigSchema,
386
+ exports.NotionIntegrationResourceConfigSchema,
387
+ exports.EmailIntegrationResourceConfigSchema,
388
+ exports.TriggerIntegrationResourceConfigSchema,
389
+ exports.SupportIntegrationResourceConfigSchema,
390
+ exports.ExtractIntegrationResourceConfigSchema,
391
+ exports.McpServerIntegrationResourceConfigSchema,
392
+ exports.TwilioIntegrationResourceConfigSchema,
100
393
  ]);
101
394
  exports.SolutionConfigSchema = zod_1.z.object({
102
395
  version: zod_1.z.literal(1),
@@ -111,16 +404,19 @@ class Resource {
111
404
  }
112
405
  get slug() {
113
406
  return (this.config.slug ??
114
- this.config.name.toLowerCase().replace(/\W/g, '_').replace(/_+/g, '_'));
407
+ (this.config.properties.name || 'unnamed')
408
+ .toLowerCase()
409
+ .replace(/\W/g, '_')
410
+ .replace(/_+/g, '_'));
115
411
  }
116
412
  get id() {
117
413
  return this.config.id;
118
414
  }
119
415
  get name() {
120
- return this.config.name;
416
+ return this.config.properties.name;
121
417
  }
122
418
  get description() {
123
- return this.config.description;
419
+ return this.config.properties.description;
124
420
  }
125
421
  get baseClient() {
126
422
  const client = new sdk_1.default({
@@ -132,25 +428,29 @@ class Resource {
132
428
  get client() {
133
429
  throw new Error('Not implemented');
134
430
  }
431
+ get createProperties() {
432
+ return this.config.properties;
433
+ }
434
+ get updateProperties() {
435
+ return this.config.properties;
436
+ }
135
437
  async sync() {
136
438
  if (this.config.id) {
137
- await this.client.update(this.config.id, {
138
- ...this.config.properties,
139
- name: this.config.name,
140
- description: this.config.description,
141
- });
439
+ await this.client.update(this.config.id, this.updateProperties);
142
440
  }
143
441
  else {
144
- const { id } = await this.client.create({
145
- ...this.config.properties,
146
- name: this.config.name,
147
- description: this.config.description,
148
- });
442
+ const { id } = await this.client.create(this.createProperties);
149
443
  this.config.id = id;
150
444
  }
151
445
  }
152
446
  }
153
447
  exports.Resource = Resource;
448
+ class BlueprintResource extends Resource {
449
+ get client() {
450
+ return this.baseClient.blueprint;
451
+ }
452
+ }
453
+ exports.BlueprintResource = BlueprintResource;
154
454
  class BotResource extends Resource {
155
455
  get client() {
156
456
  return this.baseClient.bot;
@@ -161,8 +461,26 @@ class DatasetResource extends Resource {
161
461
  get client() {
162
462
  return this.baseClient.dataset;
163
463
  }
464
+ get updateProperties() {
465
+ const updateSchema = exports.DatasetResourceConfigSchema.shape.properties.omit({
466
+ store: true,
467
+ });
468
+ return updateSchema.parse(this.config.properties);
469
+ }
164
470
  }
165
471
  exports.DatasetResource = DatasetResource;
472
+ class FileResource extends Resource {
473
+ get client() {
474
+ return this.baseClient.file;
475
+ }
476
+ }
477
+ exports.FileResource = FileResource;
478
+ class SecretResource extends Resource {
479
+ get client() {
480
+ return this.baseClient.secret;
481
+ }
482
+ }
483
+ exports.SecretResource = SecretResource;
166
484
  class SkillsetResource extends Resource {
167
485
  get client() {
168
486
  return this.baseClient.skillset;
@@ -181,6 +499,78 @@ class SitemapIntegrationResource extends Resource {
181
499
  }
182
500
  }
183
501
  exports.SitemapIntegrationResource = SitemapIntegrationResource;
502
+ class SlackIntegrationResource extends Resource {
503
+ get client() {
504
+ return this.baseClient.integration.slack;
505
+ }
506
+ }
507
+ exports.SlackIntegrationResource = SlackIntegrationResource;
508
+ class DiscordIntegrationResource extends Resource {
509
+ get client() {
510
+ return this.baseClient.integration.discord;
511
+ }
512
+ }
513
+ exports.DiscordIntegrationResource = DiscordIntegrationResource;
514
+ class TelegramIntegrationResource extends Resource {
515
+ get client() {
516
+ return this.baseClient.integration.telegram;
517
+ }
518
+ }
519
+ exports.TelegramIntegrationResource = TelegramIntegrationResource;
520
+ class WhatsAppIntegrationResource extends Resource {
521
+ get client() {
522
+ return this.baseClient.integration.whatsapp;
523
+ }
524
+ }
525
+ exports.WhatsAppIntegrationResource = WhatsAppIntegrationResource;
526
+ class MessengerIntegrationResource extends Resource {
527
+ get client() {
528
+ return this.baseClient.integration.messenger;
529
+ }
530
+ }
531
+ exports.MessengerIntegrationResource = MessengerIntegrationResource;
532
+ class NotionIntegrationResource extends Resource {
533
+ get client() {
534
+ return this.baseClient.integration.notion;
535
+ }
536
+ }
537
+ exports.NotionIntegrationResource = NotionIntegrationResource;
538
+ class EmailIntegrationResource extends Resource {
539
+ get client() {
540
+ return this.baseClient.integration.email;
541
+ }
542
+ }
543
+ exports.EmailIntegrationResource = EmailIntegrationResource;
544
+ class TriggerIntegrationResource extends Resource {
545
+ get client() {
546
+ return this.baseClient.integration.trigger;
547
+ }
548
+ }
549
+ exports.TriggerIntegrationResource = TriggerIntegrationResource;
550
+ class SupportIntegrationResource extends Resource {
551
+ get client() {
552
+ return this.baseClient.integration.support;
553
+ }
554
+ }
555
+ exports.SupportIntegrationResource = SupportIntegrationResource;
556
+ class ExtractIntegrationResource extends Resource {
557
+ get client() {
558
+ return this.baseClient.integration.extract;
559
+ }
560
+ }
561
+ exports.ExtractIntegrationResource = ExtractIntegrationResource;
562
+ class McpServerIntegrationResource extends Resource {
563
+ get client() {
564
+ return this.baseClient.integration.mcpserver;
565
+ }
566
+ }
567
+ exports.McpServerIntegrationResource = McpServerIntegrationResource;
568
+ class TwilioIntegrationResource extends Resource {
569
+ get client() {
570
+ return this.baseClient.integration.twilio;
571
+ }
572
+ }
573
+ exports.TwilioIntegrationResource = TwilioIntegrationResource;
184
574
  class Solution {
185
575
  constructor(config) {
186
576
  this.config = config;
@@ -194,12 +584,21 @@ class Solution {
194
584
  }
195
585
  get resources() {
196
586
  return this.config.resources.map((resource) => {
197
- if (resource.type === 'bot') {
587
+ if (resource.type === 'blueprint') {
588
+ return new BlueprintResource(resource);
589
+ }
590
+ else if (resource.type === 'bot') {
198
591
  return new BotResource(resource);
199
592
  }
200
593
  else if (resource.type === 'dataset') {
201
594
  return new DatasetResource(resource);
202
595
  }
596
+ else if (resource.type === 'file') {
597
+ return new FileResource(resource);
598
+ }
599
+ else if (resource.type === 'secret') {
600
+ return new SecretResource(resource);
601
+ }
203
602
  else if (resource.type === 'skillset') {
204
603
  return new SkillsetResource(resource);
205
604
  }
@@ -209,11 +608,54 @@ class Solution {
209
608
  else if (resource.type === 'sitemapIntegration') {
210
609
  return new SitemapIntegrationResource(resource);
211
610
  }
611
+ else if (resource.type === 'slackIntegration') {
612
+ return new SlackIntegrationResource(resource);
613
+ }
614
+ else if (resource.type === 'discordIntegration') {
615
+ return new DiscordIntegrationResource(resource);
616
+ }
617
+ else if (resource.type === 'telegramIntegration') {
618
+ return new TelegramIntegrationResource(resource);
619
+ }
620
+ else if (resource.type === 'whatsappIntegration') {
621
+ return new WhatsAppIntegrationResource(resource);
622
+ }
623
+ else if (resource.type === 'messengerIntegration') {
624
+ return new MessengerIntegrationResource(resource);
625
+ }
626
+ else if (resource.type === 'notionIntegration') {
627
+ return new NotionIntegrationResource(resource);
628
+ }
629
+ else if (resource.type === 'emailIntegration') {
630
+ return new EmailIntegrationResource(resource);
631
+ }
632
+ else if (resource.type === 'triggerIntegration') {
633
+ return new TriggerIntegrationResource(resource);
634
+ }
635
+ else if (resource.type === 'supportIntegration') {
636
+ return new SupportIntegrationResource(resource);
637
+ }
638
+ else if (resource.type === 'extractIntegration') {
639
+ return new ExtractIntegrationResource(resource);
640
+ }
641
+ else if (resource.type === 'mcpserverIntegration') {
642
+ return new McpServerIntegrationResource(resource);
643
+ }
644
+ else if (resource.type === 'twilioIntegration') {
645
+ return new TwilioIntegrationResource(resource);
646
+ }
212
647
  else {
213
- throw new Error(`Unknown resource type: ${resource.type}`);
648
+ const _exhaustiveCheck = (resource);
649
+ throw new Error(`Unknown resource type: ${(_exhaustiveCheck).type}`);
214
650
  }
215
651
  });
216
652
  }
653
+ get blueprints() {
654
+ return (this.resources.filter((resource) => resource instanceof BlueprintResource));
655
+ }
656
+ get blueprint() {
657
+ return getArrayBackedObject(this.blueprints);
658
+ }
217
659
  get bots() {
218
660
  return (this.resources.filter((resource) => resource instanceof BotResource));
219
661
  }
@@ -226,6 +668,18 @@ class Solution {
226
668
  get dataset() {
227
669
  return getArrayBackedObject(this.datasets);
228
670
  }
671
+ get files() {
672
+ return (this.resources.filter((resource) => resource instanceof FileResource));
673
+ }
674
+ get file() {
675
+ return getArrayBackedObject(this.files);
676
+ }
677
+ get secrets() {
678
+ return (this.resources.filter((resource) => resource instanceof SecretResource));
679
+ }
680
+ get secret() {
681
+ return getArrayBackedObject(this.secrets);
682
+ }
229
683
  get skillsets() {
230
684
  return (this.resources.filter((resource) => resource instanceof SkillsetResource));
231
685
  }
@@ -244,6 +698,78 @@ class Solution {
244
698
  get sitemapIntegration() {
245
699
  return getArrayBackedObject(this.sitemapIntegrations);
246
700
  }
701
+ get slackIntegrations() {
702
+ return (this.resources.filter((resource) => resource instanceof SlackIntegrationResource));
703
+ }
704
+ get slackIntegration() {
705
+ return getArrayBackedObject(this.slackIntegrations);
706
+ }
707
+ get discordIntegrations() {
708
+ return (this.resources.filter((resource) => resource instanceof DiscordIntegrationResource));
709
+ }
710
+ get discordIntegration() {
711
+ return getArrayBackedObject(this.discordIntegrations);
712
+ }
713
+ get telegramIntegrations() {
714
+ return (this.resources.filter((resource) => resource instanceof TelegramIntegrationResource));
715
+ }
716
+ get telegramIntegration() {
717
+ return getArrayBackedObject(this.telegramIntegrations);
718
+ }
719
+ get whatsappIntegrations() {
720
+ return (this.resources.filter((resource) => resource instanceof WhatsAppIntegrationResource));
721
+ }
722
+ get whatsappIntegration() {
723
+ return getArrayBackedObject(this.whatsappIntegrations);
724
+ }
725
+ get messengerIntegrations() {
726
+ return (this.resources.filter((resource) => resource instanceof MessengerIntegrationResource));
727
+ }
728
+ get messengerIntegration() {
729
+ return getArrayBackedObject(this.messengerIntegrations);
730
+ }
731
+ get notionIntegrations() {
732
+ return (this.resources.filter((resource) => resource instanceof NotionIntegrationResource));
733
+ }
734
+ get notionIntegration() {
735
+ return getArrayBackedObject(this.notionIntegrations);
736
+ }
737
+ get emailIntegrations() {
738
+ return (this.resources.filter((resource) => resource instanceof EmailIntegrationResource));
739
+ }
740
+ get emailIntegration() {
741
+ return getArrayBackedObject(this.emailIntegrations);
742
+ }
743
+ get triggerIntegrations() {
744
+ return (this.resources.filter((resource) => resource instanceof TriggerIntegrationResource));
745
+ }
746
+ get triggerIntegration() {
747
+ return getArrayBackedObject(this.triggerIntegrations);
748
+ }
749
+ get supportIntegrations() {
750
+ return (this.resources.filter((resource) => resource instanceof SupportIntegrationResource));
751
+ }
752
+ get supportIntegration() {
753
+ return getArrayBackedObject(this.supportIntegrations);
754
+ }
755
+ get extractIntegrations() {
756
+ return (this.resources.filter((resource) => resource instanceof ExtractIntegrationResource));
757
+ }
758
+ get extractIntegration() {
759
+ return getArrayBackedObject(this.extractIntegrations);
760
+ }
761
+ get mcpserverIntegrations() {
762
+ return (this.resources.filter((resource) => resource instanceof McpServerIntegrationResource));
763
+ }
764
+ get mcpserverIntegration() {
765
+ return getArrayBackedObject(this.mcpserverIntegrations);
766
+ }
767
+ get twilioIntegrations() {
768
+ return (this.resources.filter((resource) => resource instanceof TwilioIntegrationResource));
769
+ }
770
+ get twilioIntegration() {
771
+ return getArrayBackedObject(this.twilioIntegrations);
772
+ }
247
773
  async sync() {
248
774
  await Promise.all(this.resources.map((resource) => resource.sync()));
249
775
  }