@mindstudio-ai/agent 0.0.7 → 0.0.9

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/dist/index.js CHANGED
@@ -12,6 +12,14 @@ var MindStudioError = class extends Error {
12
12
  // src/http.ts
13
13
  async function request(config, method, path, body) {
14
14
  const url = `${config.baseUrl}/developer/v2${path}`;
15
+ await config.rateLimiter.acquire();
16
+ try {
17
+ return await requestWithRetry(config, method, url, body, 0);
18
+ } finally {
19
+ config.rateLimiter.release();
20
+ }
21
+ }
22
+ async function requestWithRetry(config, method, url, body, attempt) {
15
23
  const res = await fetch(url, {
16
24
  method,
17
25
  headers: {
@@ -21,6 +29,13 @@ async function request(config, method, path, body) {
21
29
  },
22
30
  body: body != null ? JSON.stringify(body) : void 0
23
31
  });
32
+ config.rateLimiter.updateFromHeaders(res.headers);
33
+ if (res.status === 429 && attempt < config.maxRetries) {
34
+ const retryAfter = res.headers.get("retry-after");
35
+ const waitMs = retryAfter ? parseFloat(retryAfter) * 1e3 : 1e3;
36
+ await sleep(waitMs);
37
+ return requestWithRetry(config, method, url, body, attempt + 1);
38
+ }
24
39
  if (!res.ok) {
25
40
  const errorBody = await res.json().catch(() => ({}));
26
41
  throw new MindStudioError(
@@ -33,6 +48,77 @@ async function request(config, method, path, body) {
33
48
  const data = await res.json();
34
49
  return { data, headers: res.headers };
35
50
  }
51
+ function sleep(ms) {
52
+ return new Promise((resolve) => setTimeout(resolve, ms));
53
+ }
54
+
55
+ // src/rate-limit.ts
56
+ var DEFAULTS = {
57
+ internal: { concurrency: 10, callCap: 500 },
58
+ apiKey: { concurrency: 20, callCap: Infinity }
59
+ };
60
+ var RateLimiter = class {
61
+ constructor(authType) {
62
+ this.authType = authType;
63
+ this.concurrencyLimit = DEFAULTS[authType].concurrency;
64
+ this.callCap = DEFAULTS[authType].callCap;
65
+ }
66
+ inflight = 0;
67
+ concurrencyLimit;
68
+ callCount = 0;
69
+ callCap;
70
+ queue = [];
71
+ /** Acquire a slot. Resolves when a concurrent slot is available. */
72
+ async acquire() {
73
+ if (this.callCount >= this.callCap) {
74
+ throw new MindStudioError(
75
+ `Call cap reached (${this.callCap} calls). Internal tokens are limited to 500 calls per execution.`,
76
+ "call_cap_exceeded",
77
+ 429
78
+ );
79
+ }
80
+ if (this.inflight < this.concurrencyLimit) {
81
+ this.inflight++;
82
+ this.callCount++;
83
+ return;
84
+ }
85
+ return new Promise((resolve) => {
86
+ this.queue.push(() => {
87
+ this.inflight++;
88
+ this.callCount++;
89
+ resolve();
90
+ });
91
+ });
92
+ }
93
+ /** Release a slot and let the next queued request proceed. */
94
+ release() {
95
+ this.inflight--;
96
+ const next = this.queue.shift();
97
+ if (next) next();
98
+ }
99
+ /** Update limits from response headers. */
100
+ updateFromHeaders(headers) {
101
+ const concurrency = headers.get("x-ratelimit-concurrency-limit");
102
+ if (concurrency) {
103
+ this.concurrencyLimit = parseInt(concurrency, 10);
104
+ }
105
+ const limit = headers.get("x-ratelimit-limit");
106
+ if (limit && this.authType === "internal") {
107
+ this.callCap = parseInt(limit, 10);
108
+ }
109
+ }
110
+ /** Read current rate limit state from response headers. */
111
+ static parseHeaders(headers) {
112
+ const remaining = headers.get("x-ratelimit-remaining");
113
+ const concurrencyRemaining = headers.get(
114
+ "x-ratelimit-concurrency-remaining"
115
+ );
116
+ return {
117
+ remaining: remaining != null ? parseInt(remaining, 10) : void 0,
118
+ concurrencyRemaining: concurrencyRemaining != null ? parseInt(concurrencyRemaining, 10) : void 0
119
+ };
120
+ }
121
+ };
36
122
 
37
123
  // src/generated/steps.ts
38
124
  function applyStepMethods(AgentClass) {
@@ -85,6 +171,9 @@ function applyStepMethods(AgentClass) {
85
171
  proto.convertPdfToImages = function(step, options) {
86
172
  return this.executeStep("convertPdfToImages", step, options);
87
173
  };
174
+ proto.createDataSource = function(step, options) {
175
+ return this.executeStep("createDataSource", step, options);
176
+ };
88
177
  proto.createGoogleCalendarEvent = function(step, options) {
89
178
  return this.executeStep("createGoogleCalendarEvent", step, options);
90
179
  };
@@ -94,6 +183,12 @@ function applyStepMethods(AgentClass) {
94
183
  proto.createGoogleSheet = function(step, options) {
95
184
  return this.executeStep("createGoogleSheet", step, options);
96
185
  };
186
+ proto.deleteDataSource = function(step, options) {
187
+ return this.executeStep("deleteDataSource", step, options);
188
+ };
189
+ proto.deleteDataSourceDocument = function(step, options) {
190
+ return this.executeStep("deleteDataSourceDocument", step, options);
191
+ };
97
192
  proto.deleteGoogleCalendarEvent = function(step, options) {
98
193
  return this.executeStep("deleteGoogleCalendarEvent", step, options);
99
194
  };
@@ -118,6 +213,9 @@ function applyStepMethods(AgentClass) {
118
213
  proto.extractText = function(step, options) {
119
214
  return this.executeStep("extractText", step, options);
120
215
  };
216
+ proto.fetchDataSourceDocument = function(step, options) {
217
+ return this.executeStep("fetchDataSourceDocument", step, options);
218
+ };
121
219
  proto.fetchGoogleDoc = function(step, options) {
122
220
  return this.executeStep("fetchGoogleDoc", step, options);
123
221
  };
@@ -205,6 +303,9 @@ function applyStepMethods(AgentClass) {
205
303
  proto.insertVideoClips = function(step, options) {
206
304
  return this.executeStep("insertVideoClips", step, options);
207
305
  };
306
+ proto.listDataSources = function(step, options) {
307
+ return this.executeStep("listDataSources", step, options);
308
+ };
208
309
  proto.listGoogleCalendarEvents = function(step, options) {
209
310
  return this.executeStep("listGoogleCalendarEvents", step, options);
210
311
  };
@@ -379,6 +480,9 @@ function applyStepMethods(AgentClass) {
379
480
  proto.updateGoogleSheet = function(step, options) {
380
481
  return this.executeStep("updateGoogleSheet", step, options);
381
482
  };
483
+ proto.uploadDataSourceDocument = function(step, options) {
484
+ return this.executeStep("uploadDataSourceDocument", step, options);
485
+ };
382
486
  proto.upscaleImage = function(step, options) {
383
487
  return this.executeStep("upscaleImage", step, options);
384
488
  };
@@ -424,13 +528,19 @@ function applyHelperMethods(AgentClass) {
424
528
 
425
529
  // src/client.ts
426
530
  var DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
531
+ var DEFAULT_MAX_RETRIES = 3;
427
532
  var MindStudioAgent = class {
428
533
  /** @internal */
429
534
  _httpConfig;
430
535
  constructor(options = {}) {
431
- const token = resolveToken(options.apiKey);
536
+ const { token, authType } = resolveToken(options.apiKey);
432
537
  const baseUrl = options.baseUrl ?? process.env.MINDSTUDIO_BASE_URL ?? process.env.REMOTE_HOSTNAME ?? DEFAULT_BASE_URL;
433
- this._httpConfig = { baseUrl, token };
538
+ this._httpConfig = {
539
+ baseUrl,
540
+ token,
541
+ rateLimiter: new RateLimiter(authType),
542
+ maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES
543
+ };
434
544
  }
435
545
  /**
436
546
  * Execute any step by its type name. This is the low-level method that all
@@ -464,10 +574,12 @@ var MindStudioAgent = class {
464
574
  } else {
465
575
  output = void 0;
466
576
  }
577
+ const remaining = headers.get("x-ratelimit-remaining");
467
578
  return {
468
579
  ...output,
469
580
  $appId: headers.get("x-mindstudio-app-id") ?? "",
470
- $threadId: headers.get("x-mindstudio-thread-id") ?? ""
581
+ $threadId: headers.get("x-mindstudio-thread-id") ?? "",
582
+ $rateLimitRemaining: remaining != null ? parseInt(remaining, 10) : void 0
471
583
  };
472
584
  }
473
585
  /** @internal Used by generated helper methods. */
@@ -478,9 +590,11 @@ var MindStudioAgent = class {
478
590
  applyStepMethods(MindStudioAgent);
479
591
  applyHelperMethods(MindStudioAgent);
480
592
  function resolveToken(provided) {
481
- if (provided) return provided;
482
- if (process.env.MINDSTUDIO_API_KEY) return process.env.MINDSTUDIO_API_KEY;
483
- if (process.env.CALLBACK_TOKEN) return process.env.CALLBACK_TOKEN;
593
+ if (provided) return { token: provided, authType: "apiKey" };
594
+ if (process.env.MINDSTUDIO_API_KEY)
595
+ return { token: process.env.MINDSTUDIO_API_KEY, authType: "apiKey" };
596
+ if (process.env.CALLBACK_TOKEN)
597
+ return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
484
598
  throw new MindStudioError(
485
599
  "No API key provided. Pass `apiKey` to the MindStudioAgent constructor, or set the MINDSTUDIO_API_KEY environment variable.",
486
600
  "missing_api_key",
@@ -492,146 +606,137 @@ function resolveToken(provided) {
492
606
  var stepSnippets = {
493
607
  "activeCampaignAddNote": {
494
608
  method: "activeCampaignAddNote",
495
- snippet: "{\n contactId: '',\n note: '',\n connectionId: '',\n}",
609
+ snippet: "{\n contactId: ``,\n note: ``,\n connectionId: ``,\n}",
496
610
  outputKeys: []
497
611
  },
498
612
  "activeCampaignCreateContact": {
499
613
  method: "activeCampaignCreateContact",
500
- snippet: "{\n email: '',\n firstName: '',\n lastName: '',\n phone: '',\n accountId: '',\n customFields: {},\n connectionId: '',\n}",
614
+ snippet: "{\n email: ``,\n firstName: ``,\n lastName: ``,\n phone: ``,\n accountId: ``,\n customFields: {},\n connectionId: ``,\n}",
501
615
  outputKeys: ["contactId"]
502
616
  },
503
617
  "addSubtitlesToVideo": {
504
618
  method: "addSubtitlesToVideo",
505
- snippet: `{
506
- videoUrl: '',
507
- language: '',
508
- fontName: '',
509
- fontSize: 0,
510
- fontWeight: "normal",
511
- fontColor: "white",
512
- highlightColor: "white",
513
- strokeWidth: 0,
514
- strokeColor: "black",
515
- backgroundColor: "black",
516
- backgroundOpacity: 0,
517
- position: "top",
518
- yOffset: 0,
519
- wordsPerSubtitle: 0,
520
- enableAnimation: false,
521
- }`,
619
+ snippet: '{\n videoUrl: ``,\n language: ``,\n fontName: ``,\n fontSize: 0,\n fontWeight: "normal",\n fontColor: "white",\n highlightColor: "white",\n strokeWidth: 0,\n strokeColor: "black",\n backgroundColor: "black",\n backgroundOpacity: 0,\n position: "top",\n yOffset: 0,\n wordsPerSubtitle: 0,\n enableAnimation: false,\n}',
522
620
  outputKeys: ["videoUrl"]
523
621
  },
524
622
  "airtableCreateUpdateRecord": {
525
623
  method: "airtableCreateUpdateRecord",
526
- snippet: "{\n connectionId: '',\n baseId: '',\n tableId: '',\n fields: '',\n recordData: {},\n}",
624
+ snippet: "{\n connectionId: ``,\n baseId: ``,\n tableId: ``,\n fields: ``,\n recordData: {},\n}",
527
625
  outputKeys: ["recordId"]
528
626
  },
529
627
  "airtableDeleteRecord": {
530
628
  method: "airtableDeleteRecord",
531
- snippet: "{\n connectionId: '',\n baseId: '',\n tableId: '',\n recordId: '',\n}",
629
+ snippet: "{\n connectionId: ``,\n baseId: ``,\n tableId: ``,\n recordId: ``,\n}",
532
630
  outputKeys: ["deleted"]
533
631
  },
534
632
  "airtableGetRecord": {
535
633
  method: "airtableGetRecord",
536
- snippet: "{\n connectionId: '',\n baseId: '',\n tableId: '',\n recordId: '',\n}",
634
+ snippet: "{\n connectionId: ``,\n baseId: ``,\n tableId: ``,\n recordId: ``,\n}",
537
635
  outputKeys: ["record"]
538
636
  },
539
637
  "airtableGetTableRecords": {
540
638
  method: "airtableGetTableRecords",
541
- snippet: "{\n connectionId: '',\n baseId: '',\n tableId: '',\n}",
639
+ snippet: "{\n connectionId: ``,\n baseId: ``,\n tableId: ``,\n}",
542
640
  outputKeys: ["records"]
543
641
  },
544
642
  "analyzeImage": {
545
643
  method: "analyzeImage",
546
- snippet: "{\n prompt: '',\n imageUrl: '',\n}",
644
+ snippet: "{\n prompt: ``,\n imageUrl: ``,\n}",
547
645
  outputKeys: ["analysis"]
548
646
  },
549
647
  "analyzeVideo": {
550
648
  method: "analyzeVideo",
551
- snippet: "{\n prompt: '',\n videoUrl: '',\n}",
649
+ snippet: "{\n prompt: ``,\n videoUrl: ``,\n}",
552
650
  outputKeys: ["analysis"]
553
651
  },
554
652
  "captureThumbnail": {
555
653
  method: "captureThumbnail",
556
- snippet: "{\n videoUrl: '',\n at: '',\n}",
654
+ snippet: "{\n videoUrl: ``,\n at: ``,\n}",
557
655
  outputKeys: ["thumbnailUrl"]
558
656
  },
559
657
  "codaCreateUpdatePage": {
560
658
  method: "codaCreateUpdatePage",
561
- snippet: "{\n connectionId: '',\n pageData: {},\n}",
659
+ snippet: "{\n connectionId: ``,\n pageData: {},\n}",
562
660
  outputKeys: ["pageId"]
563
661
  },
564
662
  "codaCreateUpdateRow": {
565
663
  method: "codaCreateUpdateRow",
566
- snippet: "{\n connectionId: '',\n docId: '',\n tableId: '',\n rowData: {},\n}",
664
+ snippet: "{\n connectionId: ``,\n docId: ``,\n tableId: ``,\n rowData: {},\n}",
567
665
  outputKeys: ["rowId"]
568
666
  },
569
667
  "codaFindRow": {
570
668
  method: "codaFindRow",
571
- snippet: "{\n connectionId: '',\n docId: '',\n tableId: '',\n rowData: {},\n}",
669
+ snippet: "{\n connectionId: ``,\n docId: ``,\n tableId: ``,\n rowData: {},\n}",
572
670
  outputKeys: ["row"]
573
671
  },
574
672
  "codaGetPage": {
575
673
  method: "codaGetPage",
576
- snippet: "{\n connectionId: '',\n docId: '',\n pageId: '',\n}",
674
+ snippet: "{\n connectionId: ``,\n docId: ``,\n pageId: ``,\n}",
577
675
  outputKeys: ["content"]
578
676
  },
579
677
  "codaGetTableRows": {
580
678
  method: "codaGetTableRows",
581
- snippet: "{\n connectionId: '',\n docId: '',\n tableId: '',\n}",
679
+ snippet: "{\n connectionId: ``,\n docId: ``,\n tableId: ``,\n}",
582
680
  outputKeys: ["rows"]
583
681
  },
584
682
  "convertPdfToImages": {
585
683
  method: "convertPdfToImages",
586
- snippet: "{\n pdfUrl: '',\n}",
684
+ snippet: "{\n pdfUrl: ``,\n}",
587
685
  outputKeys: ["imageUrls"]
588
686
  },
687
+ "createDataSource": {
688
+ method: "createDataSource",
689
+ snippet: "{\n name: ``,\n}",
690
+ outputKeys: []
691
+ },
589
692
  "createGoogleCalendarEvent": {
590
693
  method: "createGoogleCalendarEvent",
591
- snippet: "{\n connectionId: '',\n summary: '',\n startDateTime: '',\n endDateTime: '',\n}",
694
+ snippet: "{\n connectionId: ``,\n summary: ``,\n startDateTime: ``,\n endDateTime: ``,\n}",
592
695
  outputKeys: ["eventId", "htmlLink"]
593
696
  },
594
697
  "createGoogleDoc": {
595
698
  method: "createGoogleDoc",
596
- snippet: `{
597
- title: '',
598
- text: '',
599
- connectionId: '',
600
- textType: "plain",
601
- }`,
699
+ snippet: '{\n title: ``,\n text: ``,\n connectionId: ``,\n textType: "plain",\n}',
602
700
  outputKeys: ["documentUrl"]
603
701
  },
604
702
  "createGoogleSheet": {
605
703
  method: "createGoogleSheet",
606
- snippet: "{\n title: '',\n text: '',\n connectionId: '',\n}",
704
+ snippet: "{\n title: ``,\n text: ``,\n connectionId: ``,\n}",
607
705
  outputKeys: ["spreadsheetUrl"]
608
706
  },
707
+ "deleteDataSource": {
708
+ method: "deleteDataSource",
709
+ snippet: "{\n dataSourceId: ``,\n}",
710
+ outputKeys: []
711
+ },
712
+ "deleteDataSourceDocument": {
713
+ method: "deleteDataSourceDocument",
714
+ snippet: "{\n dataSourceId: ``,\n documentId: ``,\n}",
715
+ outputKeys: []
716
+ },
609
717
  "deleteGoogleCalendarEvent": {
610
718
  method: "deleteGoogleCalendarEvent",
611
- snippet: "{\n connectionId: '',\n eventId: '',\n}",
719
+ snippet: "{\n connectionId: ``,\n eventId: ``,\n}",
612
720
  outputKeys: []
613
721
  },
614
722
  "detectPII": {
615
723
  method: "detectPII",
616
- snippet: "{\n input: '',\n language: '',\n entities: [],\n}",
724
+ snippet: "{\n input: ``,\n language: ``,\n entities: [],\n}",
617
725
  outputKeys: ["detected", "detections"]
618
726
  },
619
727
  "downloadVideo": {
620
728
  method: "downloadVideo",
621
- snippet: `{
622
- videoUrl: '',
623
- format: "mp4",
624
- }`,
729
+ snippet: '{\n videoUrl: ``,\n format: "mp4",\n}',
625
730
  outputKeys: ["videoUrl"]
626
731
  },
627
732
  "enhanceImageGenerationPrompt": {
628
733
  method: "enhanceImageGenerationPrompt",
629
- snippet: "{\n initialPrompt: '',\n includeNegativePrompt: false,\n systemPrompt: '',\n}",
734
+ snippet: "{\n initialPrompt: ``,\n includeNegativePrompt: false,\n systemPrompt: ``,\n}",
630
735
  outputKeys: ["prompt"]
631
736
  },
632
737
  "enhanceVideoGenerationPrompt": {
633
738
  method: "enhanceVideoGenerationPrompt",
634
- snippet: "{\n initialPrompt: '',\n includeNegativePrompt: false,\n systemPrompt: '',\n}",
739
+ snippet: "{\n initialPrompt: ``,\n includeNegativePrompt: false,\n systemPrompt: ``,\n}",
635
740
  outputKeys: ["prompt"]
636
741
  },
637
742
  "enrichPerson": {
@@ -641,75 +746,57 @@ var stepSnippets = {
641
746
  },
642
747
  "extractAudioFromVideo": {
643
748
  method: "extractAudioFromVideo",
644
- snippet: "{\n videoUrl: '',\n}",
749
+ snippet: "{\n videoUrl: ``,\n}",
645
750
  outputKeys: ["audioUrl"]
646
751
  },
647
752
  "extractText": {
648
753
  method: "extractText",
649
- snippet: "{\n url: '',\n}",
754
+ snippet: "{\n url: ``,\n}",
650
755
  outputKeys: ["text"]
651
756
  },
757
+ "fetchDataSourceDocument": {
758
+ method: "fetchDataSourceDocument",
759
+ snippet: "{\n dataSourceId: ``,\n documentId: ``,\n}",
760
+ outputKeys: []
761
+ },
652
762
  "fetchGoogleDoc": {
653
763
  method: "fetchGoogleDoc",
654
- snippet: `{
655
- documentId: '',
656
- connectionId: '',
657
- exportType: "html",
658
- }`,
764
+ snippet: '{\n documentId: ``,\n connectionId: ``,\n exportType: "html",\n}',
659
765
  outputKeys: ["content"]
660
766
  },
661
767
  "fetchGoogleSheet": {
662
768
  method: "fetchGoogleSheet",
663
- snippet: `{
664
- spreadsheetId: '',
665
- range: '',
666
- connectionId: '',
667
- exportType: "csv",
668
- }`,
769
+ snippet: '{\n spreadsheetId: ``,\n range: ``,\n connectionId: ``,\n exportType: "csv",\n}',
669
770
  outputKeys: ["content"]
670
771
  },
671
772
  "fetchSlackChannelHistory": {
672
773
  method: "fetchSlackChannelHistory",
673
- snippet: "{\n connectionId: '',\n channelId: '',\n}",
774
+ snippet: "{\n connectionId: ``,\n channelId: ``,\n}",
674
775
  outputKeys: ["messages"]
675
776
  },
676
777
  "fetchYoutubeCaptions": {
677
778
  method: "fetchYoutubeCaptions",
678
- snippet: `{
679
- videoUrl: '',
680
- exportType: "text",
681
- language: '',
682
- }`,
779
+ snippet: '{\n videoUrl: ``,\n exportType: "text",\n language: ``,\n}',
683
780
  outputKeys: ["transcripts"]
684
781
  },
685
782
  "fetchYoutubeChannel": {
686
783
  method: "fetchYoutubeChannel",
687
- snippet: "{\n channelUrl: '',\n}",
784
+ snippet: "{\n channelUrl: ``,\n}",
688
785
  outputKeys: ["channel"]
689
786
  },
690
787
  "fetchYoutubeComments": {
691
788
  method: "fetchYoutubeComments",
692
- snippet: `{
693
- videoUrl: '',
694
- exportType: "text",
695
- limitPages: '',
696
- }`,
789
+ snippet: '{\n videoUrl: ``,\n exportType: "text",\n limitPages: ``,\n}',
697
790
  outputKeys: ["comments"]
698
791
  },
699
792
  "fetchYoutubeVideo": {
700
793
  method: "fetchYoutubeVideo",
701
- snippet: "{\n videoUrl: '',\n}",
794
+ snippet: "{\n videoUrl: ``,\n}",
702
795
  outputKeys: ["video"]
703
796
  },
704
797
  "generateAsset": {
705
798
  method: "generateAsset",
706
- snippet: `{
707
- source: '',
708
- sourceType: "html",
709
- outputFormat: "pdf",
710
- pageSize: "full",
711
- testData: {},
712
- }`,
799
+ snippet: '{\n source: ``,\n sourceType: "html",\n outputFormat: "pdf",\n pageSize: "full",\n testData: {},\n}',
713
800
  outputKeys: ["url"]
714
801
  },
715
802
  "generateChart": {
@@ -719,7 +806,7 @@ var stepSnippets = {
719
806
  },
720
807
  "generateImage": {
721
808
  method: "generateImage",
722
- snippet: "{\n prompt: '',\n}",
809
+ snippet: "{\n prompt: ``,\n}",
723
810
  outputKeys: ["imageUrl"]
724
811
  },
725
812
  "generateLipsync": {
@@ -729,141 +816,122 @@ var stepSnippets = {
729
816
  },
730
817
  "generateMusic": {
731
818
  method: "generateMusic",
732
- snippet: "{\n text: '',\n}",
819
+ snippet: "{\n text: ``,\n}",
733
820
  outputKeys: []
734
821
  },
822
+ "generatePdf": {
823
+ method: "generateAsset",
824
+ snippet: '{\n source: ``,\n sourceType: "html",\n outputFormat: "pdf",\n pageSize: "full",\n testData: {},\n}',
825
+ outputKeys: ["url"]
826
+ },
735
827
  "generateStaticVideoFromImage": {
736
828
  method: "generateStaticVideoFromImage",
737
- snippet: "{\n imageUrl: '',\n duration: '',\n}",
829
+ snippet: "{\n imageUrl: ``,\n duration: ``,\n}",
738
830
  outputKeys: ["videoUrl"]
739
831
  },
740
832
  "generateText": {
741
833
  method: "generateText",
742
- snippet: "{\n message: '',\n}",
834
+ snippet: "{\n message: ``,\n}",
743
835
  outputKeys: ["content"]
744
836
  },
745
837
  "generateVideo": {
746
838
  method: "generateVideo",
747
- snippet: "{\n prompt: '',\n}",
839
+ snippet: "{\n prompt: ``,\n}",
748
840
  outputKeys: ["videoUrl"]
749
841
  },
750
842
  "getGoogleCalendarEvent": {
751
843
  method: "getGoogleCalendarEvent",
752
- snippet: `{
753
- connectionId: '',
754
- eventId: '',
755
- exportType: "json",
756
- }`,
844
+ snippet: '{\n connectionId: ``,\n eventId: ``,\n exportType: "json",\n}',
757
845
  outputKeys: ["event"]
758
846
  },
759
847
  "getMediaMetadata": {
760
848
  method: "getMediaMetadata",
761
- snippet: "{\n mediaUrl: '',\n}",
849
+ snippet: "{\n mediaUrl: ``,\n}",
762
850
  outputKeys: ["metadata"]
763
851
  },
764
852
  "httpRequest": {
765
853
  method: "httpRequest",
766
- snippet: `{
767
- url: '',
768
- method: '',
769
- headers: {},
770
- queryParams: {},
771
- body: '',
772
- bodyItems: {},
773
- contentType: "none",
774
- customContentType: '',
775
- }`,
854
+ snippet: '{\n url: ``,\n method: ``,\n headers: {},\n queryParams: {},\n body: ``,\n bodyItems: {},\n contentType: "none",\n customContentType: ``,\n}',
776
855
  outputKeys: ["ok", "status", "statusText", "response"]
777
856
  },
778
857
  "hubspotCreateCompany": {
779
858
  method: "hubspotCreateCompany",
780
- snippet: "{\n connectionId: '',\n company: {},\n enabledProperties: [],\n}",
859
+ snippet: "{\n connectionId: ``,\n company: {},\n enabledProperties: [],\n}",
781
860
  outputKeys: ["companyId"]
782
861
  },
783
862
  "hubspotCreateContact": {
784
863
  method: "hubspotCreateContact",
785
- snippet: "{\n connectionId: '',\n contact: {},\n enabledProperties: [],\n companyDomain: '',\n}",
864
+ snippet: "{\n connectionId: ``,\n contact: {},\n enabledProperties: [],\n companyDomain: ``,\n}",
786
865
  outputKeys: ["contactId"]
787
866
  },
788
867
  "hubspotGetCompany": {
789
868
  method: "hubspotGetCompany",
790
- snippet: `{
791
- connectionId: '',
792
- searchBy: "domain",
793
- companyDomain: '',
794
- companyId: '',
795
- additionalProperties: [],
796
- }`,
869
+ snippet: '{\n connectionId: ``,\n searchBy: "domain",\n companyDomain: ``,\n companyId: ``,\n additionalProperties: [],\n}',
797
870
  outputKeys: ["company"]
798
871
  },
799
872
  "hubspotGetContact": {
800
873
  method: "hubspotGetContact",
801
- snippet: `{
802
- connectionId: '',
803
- searchBy: "email",
804
- contactEmail: '',
805
- contactId: '',
806
- additionalProperties: [],
807
- }`,
874
+ snippet: '{\n connectionId: ``,\n searchBy: "email",\n contactEmail: ``,\n contactId: ``,\n additionalProperties: [],\n}',
808
875
  outputKeys: ["contact"]
809
876
  },
810
877
  "hunterApiCompanyEnrichment": {
811
878
  method: "hunterApiCompanyEnrichment",
812
- snippet: "{\n domain: '',\n}",
879
+ snippet: "{\n domain: ``,\n}",
813
880
  outputKeys: ["data"]
814
881
  },
815
882
  "hunterApiDomainSearch": {
816
883
  method: "hunterApiDomainSearch",
817
- snippet: "{\n domain: '',\n}",
884
+ snippet: "{\n domain: ``,\n}",
818
885
  outputKeys: ["data"]
819
886
  },
820
887
  "hunterApiEmailFinder": {
821
888
  method: "hunterApiEmailFinder",
822
- snippet: "{\n domain: '',\n firstName: '',\n lastName: '',\n}",
889
+ snippet: "{\n domain: ``,\n firstName: ``,\n lastName: ``,\n}",
823
890
  outputKeys: ["data"]
824
891
  },
825
892
  "hunterApiEmailVerification": {
826
893
  method: "hunterApiEmailVerification",
827
- snippet: "{\n email: '',\n}",
894
+ snippet: "{\n email: ``,\n}",
828
895
  outputKeys: ["data"]
829
896
  },
830
897
  "hunterApiPersonEnrichment": {
831
898
  method: "hunterApiPersonEnrichment",
832
- snippet: "{\n email: '',\n}",
899
+ snippet: "{\n email: ``,\n}",
833
900
  outputKeys: ["data"]
834
901
  },
835
902
  "imageFaceSwap": {
836
903
  method: "imageFaceSwap",
837
- snippet: "{\n imageUrl: '',\n faceImageUrl: '',\n engine: '',\n}",
904
+ snippet: "{\n imageUrl: ``,\n faceImageUrl: ``,\n engine: ``,\n}",
838
905
  outputKeys: ["imageUrl"]
839
906
  },
840
907
  "imageRemoveWatermark": {
841
908
  method: "imageRemoveWatermark",
842
- snippet: "{\n imageUrl: '',\n engine: '',\n}",
909
+ snippet: "{\n imageUrl: ``,\n engine: ``,\n}",
843
910
  outputKeys: ["imageUrl"]
844
911
  },
845
912
  "insertVideoClips": {
846
913
  method: "insertVideoClips",
847
- snippet: "{\n baseVideoUrl: '',\n overlayVideos: [],\n}",
914
+ snippet: "{\n baseVideoUrl: ``,\n overlayVideos: [],\n}",
848
915
  outputKeys: ["videoUrl"]
849
916
  },
917
+ "listDataSources": {
918
+ method: "listDataSources",
919
+ snippet: "{}",
920
+ outputKeys: []
921
+ },
850
922
  "listGoogleCalendarEvents": {
851
923
  method: "listGoogleCalendarEvents",
852
- snippet: `{
853
- connectionId: '',
854
- limit: 0,
855
- exportType: "json",
856
- }`,
924
+ snippet: '{\n connectionId: ``,\n limit: 0,\n exportType: "json",\n}',
857
925
  outputKeys: ["events"]
858
926
  },
859
927
  "logic": {
860
928
  method: "logic",
861
- snippet: "{\n context: '',\n cases: [],\n}",
929
+ snippet: "{\n context: ``,\n cases: [],\n}",
862
930
  outputKeys: ["selectedCase"]
863
931
  },
864
932
  "makeDotComRunScenario": {
865
933
  method: "makeDotComRunScenario",
866
- snippet: "{\n webhookUrl: '',\n input: {},\n}",
934
+ snippet: "{\n webhookUrl: ``,\n input: {},\n}",
867
935
  outputKeys: ["data"]
868
936
  },
869
937
  "mergeAudio": {
@@ -878,402 +946,312 @@ var stepSnippets = {
878
946
  },
879
947
  "mixAudioIntoVideo": {
880
948
  method: "mixAudioIntoVideo",
881
- snippet: "{\n videoUrl: '',\n audioUrl: '',\n options: {},\n}",
949
+ snippet: "{\n videoUrl: ``,\n audioUrl: ``,\n options: {},\n}",
882
950
  outputKeys: ["videoUrl"]
883
951
  },
884
952
  "muteVideo": {
885
953
  method: "muteVideo",
886
- snippet: "{\n videoUrl: '',\n}",
954
+ snippet: "{\n videoUrl: ``,\n}",
887
955
  outputKeys: ["videoUrl"]
888
956
  },
889
957
  "n8nRunNode": {
890
958
  method: "n8nRunNode",
891
- snippet: `{
892
- method: '',
893
- authentication: "none",
894
- user: '',
895
- password: '',
896
- webhookUrl: '',
897
- input: {},
898
- }`,
959
+ snippet: '{\n method: ``,\n authentication: "none",\n user: ``,\n password: ``,\n webhookUrl: ``,\n input: {},\n}',
899
960
  outputKeys: ["data"]
900
961
  },
901
962
  "notionCreatePage": {
902
963
  method: "notionCreatePage",
903
- snippet: "{\n pageId: '',\n content: '',\n title: '',\n connectionId: '',\n}",
964
+ snippet: "{\n pageId: ``,\n content: ``,\n title: ``,\n connectionId: ``,\n}",
904
965
  outputKeys: ["pageId", "pageUrl"]
905
966
  },
906
967
  "notionUpdatePage": {
907
968
  method: "notionUpdatePage",
908
- snippet: `{
909
- pageId: '',
910
- content: '',
911
- mode: "append",
912
- connectionId: '',
913
- }`,
969
+ snippet: '{\n pageId: ``,\n content: ``,\n mode: "append",\n connectionId: ``,\n}',
914
970
  outputKeys: ["pageId", "pageUrl"]
915
971
  },
916
972
  "peopleSearch": {
917
973
  method: "peopleSearch",
918
- snippet: "{\n smartQuery: '',\n enrichPeople: false,\n enrichOrganizations: false,\n limit: '',\n page: '',\n params: {},\n}",
974
+ snippet: "{\n smartQuery: ``,\n enrichPeople: false,\n enrichOrganizations: false,\n limit: ``,\n page: ``,\n params: {},\n}",
919
975
  outputKeys: ["results"]
920
976
  },
921
977
  "postToLinkedIn": {
922
978
  method: "postToLinkedIn",
923
- snippet: `{
924
- message: '',
925
- visibility: "PUBLIC",
926
- connectionId: '',
927
- }`,
979
+ snippet: '{\n message: ``,\n visibility: "PUBLIC",\n connectionId: ``,\n}',
928
980
  outputKeys: []
929
981
  },
930
982
  "postToSlackChannel": {
931
983
  method: "postToSlackChannel",
932
- snippet: `{
933
- channelId: '',
934
- messageType: "string",
935
- message: '',
936
- connectionId: '',
937
- }`,
984
+ snippet: '{\n channelId: ``,\n messageType: "string",\n message: ``,\n connectionId: ``,\n}',
938
985
  outputKeys: []
939
986
  },
940
987
  "postToX": {
941
988
  method: "postToX",
942
- snippet: "{\n text: '',\n connectionId: '',\n}",
989
+ snippet: "{\n text: ``,\n connectionId: ``,\n}",
943
990
  outputKeys: []
944
991
  },
945
992
  "postToZapier": {
946
993
  method: "postToZapier",
947
- snippet: "{\n webhookUrl: '',\n input: {},\n}",
994
+ snippet: "{\n webhookUrl: ``,\n input: {},\n}",
948
995
  outputKeys: ["data"]
949
996
  },
950
997
  "queryDataSource": {
951
998
  method: "queryDataSource",
952
- snippet: "{\n dataSourceId: '',\n query: '',\n maxResults: 0,\n}",
999
+ snippet: "{\n dataSourceId: ``,\n query: ``,\n maxResults: 0,\n}",
953
1000
  outputKeys: ["text", "chunks", "query", "citations", "latencyMs"]
954
1001
  },
955
1002
  "queryExternalDatabase": {
956
1003
  method: "queryExternalDatabase",
957
- snippet: `{
958
- connectionId: '',
959
- query: '',
960
- outputFormat: "json",
961
- }`,
1004
+ snippet: '{\n connectionId: ``,\n query: ``,\n outputFormat: "json",\n}',
962
1005
  outputKeys: ["data"]
963
1006
  },
964
1007
  "redactPII": {
965
1008
  method: "redactPII",
966
- snippet: "{\n input: '',\n language: '',\n entities: [],\n}",
1009
+ snippet: "{\n input: ``,\n language: ``,\n entities: [],\n}",
967
1010
  outputKeys: ["text"]
968
1011
  },
969
1012
  "removeBackgroundFromImage": {
970
1013
  method: "removeBackgroundFromImage",
971
- snippet: "{\n imageUrl: '',\n}",
1014
+ snippet: "{\n imageUrl: ``,\n}",
972
1015
  outputKeys: ["imageUrl"]
973
1016
  },
974
1017
  "resizeVideo": {
975
1018
  method: "resizeVideo",
976
- snippet: `{
977
- videoUrl: '',
978
- mode: "fit",
979
- }`,
1019
+ snippet: '{\n videoUrl: ``,\n mode: "fit",\n}',
980
1020
  outputKeys: ["videoUrl"]
981
1021
  },
982
1022
  "runPackagedWorkflow": {
983
1023
  method: "runPackagedWorkflow",
984
- snippet: "{\n appId: '',\n workflowId: '',\n inputVariables: {},\n outputVariables: {},\n name: '',\n}",
1024
+ snippet: "{\n appId: ``,\n workflowId: ``,\n inputVariables: {},\n outputVariables: {},\n name: ``,\n}",
985
1025
  outputKeys: ["data"]
986
1026
  },
987
1027
  "scrapeFacebookPage": {
988
1028
  method: "scrapeFacebookPage",
989
- snippet: "{\n pageUrl: '',\n}",
1029
+ snippet: "{\n pageUrl: ``,\n}",
990
1030
  outputKeys: ["data"]
991
1031
  },
992
1032
  "scrapeFacebookPosts": {
993
1033
  method: "scrapeFacebookPosts",
994
- snippet: "{\n pageUrl: '',\n}",
1034
+ snippet: "{\n pageUrl: ``,\n}",
995
1035
  outputKeys: ["data"]
996
1036
  },
997
1037
  "scrapeInstagramComments": {
998
1038
  method: "scrapeInstagramComments",
999
- snippet: "{\n postUrl: '',\n resultsLimit: '',\n}",
1039
+ snippet: "{\n postUrl: ``,\n resultsLimit: ``,\n}",
1000
1040
  outputKeys: ["data"]
1001
1041
  },
1002
1042
  "scrapeInstagramMentions": {
1003
1043
  method: "scrapeInstagramMentions",
1004
- snippet: "{\n profileUrl: '',\n resultsLimit: '',\n}",
1044
+ snippet: "{\n profileUrl: ``,\n resultsLimit: ``,\n}",
1005
1045
  outputKeys: ["data"]
1006
1046
  },
1007
1047
  "scrapeInstagramPosts": {
1008
1048
  method: "scrapeInstagramPosts",
1009
- snippet: "{\n profileUrl: '',\n resultsLimit: '',\n onlyPostsNewerThan: '',\n}",
1049
+ snippet: "{\n profileUrl: ``,\n resultsLimit: ``,\n onlyPostsNewerThan: ``,\n}",
1010
1050
  outputKeys: ["data"]
1011
1051
  },
1012
1052
  "scrapeInstagramProfile": {
1013
1053
  method: "scrapeInstagramProfile",
1014
- snippet: "{\n profileUrl: '',\n}",
1054
+ snippet: "{\n profileUrl: ``,\n}",
1015
1055
  outputKeys: ["data"]
1016
1056
  },
1017
1057
  "scrapeInstagramReels": {
1018
1058
  method: "scrapeInstagramReels",
1019
- snippet: "{\n profileUrl: '',\n resultsLimit: '',\n}",
1059
+ snippet: "{\n profileUrl: ``,\n resultsLimit: ``,\n}",
1020
1060
  outputKeys: ["data"]
1021
1061
  },
1022
1062
  "scrapeLinkedInCompany": {
1023
1063
  method: "scrapeLinkedInCompany",
1024
- snippet: "{\n url: '',\n}",
1064
+ snippet: "{\n url: ``,\n}",
1025
1065
  outputKeys: ["company"]
1026
1066
  },
1027
1067
  "scrapeLinkedInProfile": {
1028
1068
  method: "scrapeLinkedInProfile",
1029
- snippet: "{\n url: '',\n}",
1069
+ snippet: "{\n url: ``,\n}",
1030
1070
  outputKeys: ["profile"]
1031
1071
  },
1032
1072
  "scrapeMetaThreadsProfile": {
1033
1073
  method: "scrapeMetaThreadsProfile",
1034
- snippet: "{\n profileUrl: '',\n}",
1074
+ snippet: "{\n profileUrl: ``,\n}",
1035
1075
  outputKeys: ["data"]
1036
1076
  },
1037
1077
  "scrapeUrl": {
1038
1078
  method: "scrapeUrl",
1039
- snippet: "{\n url: '',\n}",
1079
+ snippet: "{\n url: ``,\n}",
1040
1080
  outputKeys: ["content"]
1041
1081
  },
1042
1082
  "scrapeXPost": {
1043
1083
  method: "scrapeXPost",
1044
- snippet: "{\n url: '',\n}",
1084
+ snippet: "{\n url: ``,\n}",
1045
1085
  outputKeys: ["post"]
1046
1086
  },
1047
1087
  "scrapeXProfile": {
1048
1088
  method: "scrapeXProfile",
1049
- snippet: "{\n url: '',\n}",
1089
+ snippet: "{\n url: ``,\n}",
1050
1090
  outputKeys: ["profile"]
1051
1091
  },
1052
1092
  "searchGoogle": {
1053
1093
  method: "searchGoogle",
1054
- snippet: `{
1055
- query: '',
1056
- exportType: "text",
1057
- }`,
1094
+ snippet: '{\n query: ``,\n exportType: "text",\n}',
1058
1095
  outputKeys: ["results"]
1059
1096
  },
1060
1097
  "searchGoogleImages": {
1061
1098
  method: "searchGoogleImages",
1062
- snippet: `{
1063
- query: '',
1064
- exportType: "text",
1065
- }`,
1099
+ snippet: '{\n query: ``,\n exportType: "text",\n}',
1066
1100
  outputKeys: ["images"]
1067
1101
  },
1068
1102
  "searchGoogleNews": {
1069
1103
  method: "searchGoogleNews",
1070
- snippet: `{
1071
- text: '',
1072
- exportType: "text",
1073
- }`,
1104
+ snippet: '{\n text: ``,\n exportType: "text",\n}',
1074
1105
  outputKeys: ["articles"]
1075
1106
  },
1076
1107
  "searchGoogleTrends": {
1077
1108
  method: "searchGoogleTrends",
1078
- snippet: `{
1079
- text: '',
1080
- hl: '',
1081
- geo: '',
1082
- data_type: "TIMESERIES",
1083
- cat: '',
1084
- date: '',
1085
- ts: '',
1086
- }`,
1109
+ snippet: '{\n text: ``,\n hl: ``,\n geo: ``,\n data_type: "TIMESERIES",\n cat: ``,\n date: ``,\n ts: ``,\n}',
1087
1110
  outputKeys: ["trends"]
1088
1111
  },
1089
1112
  "searchPerplexity": {
1090
1113
  method: "searchPerplexity",
1091
- snippet: `{
1092
- query: '',
1093
- exportType: "text",
1094
- }`,
1114
+ snippet: '{\n query: ``,\n exportType: "text",\n}',
1095
1115
  outputKeys: ["results"]
1096
1116
  },
1097
1117
  "searchXPosts": {
1098
1118
  method: "searchXPosts",
1099
- snippet: `{
1100
- query: '',
1101
- scope: "recent",
1102
- options: {},
1103
- }`,
1119
+ snippet: '{\n query: ``,\n scope: "recent",\n options: {},\n}',
1104
1120
  outputKeys: ["posts"]
1105
1121
  },
1106
1122
  "searchYoutube": {
1107
1123
  method: "searchYoutube",
1108
- snippet: "{\n query: '',\n limitPages: '',\n filter: '',\n filterType: '',\n}",
1124
+ snippet: "{\n query: ``,\n limitPages: ``,\n filter: ``,\n filterType: ``,\n}",
1109
1125
  outputKeys: ["results"]
1110
1126
  },
1111
1127
  "searchYoutubeTrends": {
1112
1128
  method: "searchYoutubeTrends",
1113
- snippet: `{
1114
- bp: "now",
1115
- hl: '',
1116
- gl: '',
1117
- }`,
1129
+ snippet: '{\n bp: "now",\n hl: ``,\n gl: ``,\n}',
1118
1130
  outputKeys: ["trends"]
1119
1131
  },
1120
1132
  "sendEmail": {
1121
1133
  method: "sendEmail",
1122
- snippet: "{\n subject: '',\n body: '',\n connectionId: '',\n}",
1134
+ snippet: "{\n subject: ``,\n body: ``,\n connectionId: ``,\n}",
1123
1135
  outputKeys: ["recipients"]
1124
1136
  },
1125
1137
  "sendSMS": {
1126
1138
  method: "sendSMS",
1127
- snippet: "{\n body: '',\n connectionId: '',\n}",
1139
+ snippet: "{\n body: ``,\n connectionId: ``,\n}",
1128
1140
  outputKeys: []
1129
1141
  },
1130
1142
  "setRunTitle": {
1131
1143
  method: "setRunTitle",
1132
- snippet: "{\n title: '',\n}",
1144
+ snippet: "{\n title: ``,\n}",
1133
1145
  outputKeys: []
1134
1146
  },
1135
1147
  "setVariable": {
1136
1148
  method: "setVariable",
1137
- snippet: `{
1138
- value: '',
1139
- type: "imageUrl",
1140
- }`,
1149
+ snippet: '{\n value: ``,\n type: "imageUrl",\n}',
1141
1150
  outputKeys: ["variableName", "value"]
1142
1151
  },
1143
1152
  "telegramSendAudio": {
1144
1153
  method: "telegramSendAudio",
1145
- snippet: `{
1146
- botToken: '',
1147
- chatId: '',
1148
- audioUrl: '',
1149
- mode: "audio",
1150
- }`,
1154
+ snippet: '{\n botToken: ``,\n chatId: ``,\n audioUrl: ``,\n mode: "audio",\n}',
1151
1155
  outputKeys: []
1152
1156
  },
1153
1157
  "telegramSendFile": {
1154
1158
  method: "telegramSendFile",
1155
- snippet: "{\n botToken: '',\n chatId: '',\n fileUrl: '',\n}",
1159
+ snippet: "{\n botToken: ``,\n chatId: ``,\n fileUrl: ``,\n}",
1156
1160
  outputKeys: []
1157
1161
  },
1158
1162
  "telegramSendImage": {
1159
1163
  method: "telegramSendImage",
1160
- snippet: "{\n botToken: '',\n chatId: '',\n imageUrl: '',\n}",
1164
+ snippet: "{\n botToken: ``,\n chatId: ``,\n imageUrl: ``,\n}",
1161
1165
  outputKeys: []
1162
1166
  },
1163
1167
  "telegramSendMessage": {
1164
1168
  method: "telegramSendMessage",
1165
- snippet: "{\n botToken: '',\n chatId: '',\n text: '',\n}",
1169
+ snippet: "{\n botToken: ``,\n chatId: ``,\n text: ``,\n}",
1166
1170
  outputKeys: []
1167
1171
  },
1168
1172
  "telegramSendVideo": {
1169
1173
  method: "telegramSendVideo",
1170
- snippet: "{\n botToken: '',\n chatId: '',\n videoUrl: '',\n}",
1174
+ snippet: "{\n botToken: ``,\n chatId: ``,\n videoUrl: ``,\n}",
1171
1175
  outputKeys: []
1172
1176
  },
1173
1177
  "telegramSetTyping": {
1174
1178
  method: "telegramSetTyping",
1175
- snippet: "{\n botToken: '',\n chatId: '',\n}",
1179
+ snippet: "{\n botToken: ``,\n chatId: ``,\n}",
1176
1180
  outputKeys: []
1177
1181
  },
1178
1182
  "textToSpeech": {
1179
1183
  method: "textToSpeech",
1180
- snippet: "{\n text: '',\n}",
1184
+ snippet: "{\n text: ``,\n}",
1181
1185
  outputKeys: ["audioUrl"]
1182
1186
  },
1183
1187
  "transcribeAudio": {
1184
1188
  method: "transcribeAudio",
1185
- snippet: "{\n audioUrl: '',\n prompt: '',\n}",
1189
+ snippet: "{\n audioUrl: ``,\n prompt: ``,\n}",
1186
1190
  outputKeys: ["text"]
1187
1191
  },
1188
1192
  "trimMedia": {
1189
1193
  method: "trimMedia",
1190
- snippet: "{\n inputUrl: '',\n}",
1194
+ snippet: "{\n inputUrl: ``,\n}",
1191
1195
  outputKeys: ["mediaUrl"]
1192
1196
  },
1193
1197
  "updateGoogleCalendarEvent": {
1194
1198
  method: "updateGoogleCalendarEvent",
1195
- snippet: "{\n connectionId: '',\n eventId: '',\n}",
1199
+ snippet: "{\n connectionId: ``,\n eventId: ``,\n}",
1196
1200
  outputKeys: ["eventId", "htmlLink"]
1197
1201
  },
1198
1202
  "updateGoogleDoc": {
1199
1203
  method: "updateGoogleDoc",
1200
- snippet: `{
1201
- documentId: '',
1202
- connectionId: '',
1203
- text: '',
1204
- textType: "plain",
1205
- operationType: "addToTop",
1206
- }`,
1204
+ snippet: '{\n documentId: ``,\n connectionId: ``,\n text: ``,\n textType: "plain",\n operationType: "addToTop",\n}',
1207
1205
  outputKeys: ["documentUrl"]
1208
1206
  },
1209
1207
  "updateGoogleSheet": {
1210
1208
  method: "updateGoogleSheet",
1211
- snippet: `{
1212
- text: '',
1213
- connectionId: '',
1214
- spreadsheetId: '',
1215
- range: '',
1216
- operationType: "addToBottom",
1217
- }`,
1209
+ snippet: '{\n text: ``,\n connectionId: ``,\n spreadsheetId: ``,\n range: ``,\n operationType: "addToBottom",\n}',
1218
1210
  outputKeys: ["spreadsheetUrl"]
1219
1211
  },
1212
+ "uploadDataSourceDocument": {
1213
+ method: "uploadDataSourceDocument",
1214
+ snippet: "{\n dataSourceId: ``,\n file: ``,\n fileName: ``,\n}",
1215
+ outputKeys: []
1216
+ },
1220
1217
  "upscaleImage": {
1221
1218
  method: "upscaleImage",
1222
- snippet: `{
1223
- imageUrl: '',
1224
- targetResolution: "2k",
1225
- engine: "standard",
1226
- }`,
1219
+ snippet: '{\n imageUrl: ``,\n targetResolution: "2k",\n engine: "standard",\n}',
1227
1220
  outputKeys: ["imageUrl"]
1228
1221
  },
1229
1222
  "upscaleVideo": {
1230
1223
  method: "upscaleVideo",
1231
- snippet: `{
1232
- videoUrl: '',
1233
- targetResolution: "720p",
1234
- engine: "standard",
1235
- }`,
1224
+ snippet: '{\n videoUrl: ``,\n targetResolution: "720p",\n engine: "standard",\n}',
1236
1225
  outputKeys: ["videoUrl"]
1237
1226
  },
1227
+ "userMessage": {
1228
+ method: "generateText",
1229
+ snippet: "{\n message: ``,\n}",
1230
+ outputKeys: ["content"]
1231
+ },
1238
1232
  "videoFaceSwap": {
1239
1233
  method: "videoFaceSwap",
1240
- snippet: "{\n videoUrl: '',\n faceImageUrl: '',\n targetIndex: 0,\n engine: '',\n}",
1234
+ snippet: "{\n videoUrl: ``,\n faceImageUrl: ``,\n targetIndex: 0,\n engine: ``,\n}",
1241
1235
  outputKeys: ["videoUrl"]
1242
1236
  },
1243
1237
  "videoRemoveBackground": {
1244
1238
  method: "videoRemoveBackground",
1245
- snippet: `{
1246
- videoUrl: '',
1247
- newBackground: "transparent",
1248
- engine: '',
1249
- }`,
1239
+ snippet: '{\n videoUrl: ``,\n newBackground: "transparent",\n engine: ``,\n}',
1250
1240
  outputKeys: ["videoUrl"]
1251
1241
  },
1252
1242
  "videoRemoveWatermark": {
1253
1243
  method: "videoRemoveWatermark",
1254
- snippet: "{\n videoUrl: '',\n engine: '',\n}",
1244
+ snippet: "{\n videoUrl: ``,\n engine: ``,\n}",
1255
1245
  outputKeys: ["videoUrl"]
1256
1246
  },
1257
1247
  "watermarkImage": {
1258
1248
  method: "watermarkImage",
1259
- snippet: `{
1260
- imageUrl: '',
1261
- watermarkImageUrl: '',
1262
- corner: "top-left",
1263
- paddingPx: 0,
1264
- widthPx: 0,
1265
- }`,
1249
+ snippet: '{\n imageUrl: ``,\n watermarkImageUrl: ``,\n corner: "top-left",\n paddingPx: 0,\n widthPx: 0,\n}',
1266
1250
  outputKeys: ["imageUrl"]
1267
1251
  },
1268
1252
  "watermarkVideo": {
1269
1253
  method: "watermarkVideo",
1270
- snippet: `{
1271
- videoUrl: '',
1272
- imageUrl: '',
1273
- corner: "top-left",
1274
- paddingPx: 0,
1275
- widthPx: 0,
1276
- }`,
1254
+ snippet: '{\n videoUrl: ``,\n imageUrl: ``,\n corner: "top-left",\n paddingPx: 0,\n widthPx: 0,\n}',
1277
1255
  outputKeys: ["videoUrl"]
1278
1256
  }
1279
1257
  };