integrate-sdk 0.8.28 → 0.8.30-dev.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.
Files changed (55) hide show
  1. package/dist/adapters/auto-routes.js +397 -0
  2. package/dist/adapters/index.js +397 -0
  3. package/dist/adapters/nextjs.js +397 -0
  4. package/dist/adapters/node.js +397 -0
  5. package/dist/adapters/svelte-kit.js +397 -0
  6. package/dist/adapters/tanstack-start.js +397 -0
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +434 -1
  10. package/dist/oauth.js +397 -0
  11. package/dist/server.js +406 -0
  12. package/dist/src/client.d.ts +10 -1
  13. package/dist/src/client.d.ts.map +1 -1
  14. package/dist/src/index.d.ts +18 -0
  15. package/dist/src/index.d.ts.map +1 -1
  16. package/dist/src/integrations/airtable-client.d.ts +260 -0
  17. package/dist/src/integrations/airtable-client.d.ts.map +1 -0
  18. package/dist/src/integrations/airtable.d.ts +37 -0
  19. package/dist/src/integrations/airtable.d.ts.map +1 -0
  20. package/dist/src/integrations/gcal-client.d.ts +370 -0
  21. package/dist/src/integrations/gcal-client.d.ts.map +1 -0
  22. package/dist/src/integrations/gcal.d.ts +37 -0
  23. package/dist/src/integrations/gcal.d.ts.map +1 -0
  24. package/dist/src/integrations/linear-client.d.ts +309 -0
  25. package/dist/src/integrations/linear-client.d.ts.map +1 -0
  26. package/dist/src/integrations/linear.d.ts +37 -0
  27. package/dist/src/integrations/linear.d.ts.map +1 -0
  28. package/dist/src/integrations/outlook-client.d.ts +433 -0
  29. package/dist/src/integrations/outlook-client.d.ts.map +1 -0
  30. package/dist/src/integrations/outlook.d.ts +37 -0
  31. package/dist/src/integrations/outlook.d.ts.map +1 -0
  32. package/dist/src/integrations/slack-client.d.ts +271 -0
  33. package/dist/src/integrations/slack-client.d.ts.map +1 -0
  34. package/dist/src/integrations/slack.d.ts +37 -0
  35. package/dist/src/integrations/slack.d.ts.map +1 -0
  36. package/dist/src/integrations/stripe-client.d.ts +412 -0
  37. package/dist/src/integrations/stripe-client.d.ts.map +1 -0
  38. package/dist/src/integrations/stripe.d.ts +37 -0
  39. package/dist/src/integrations/stripe.d.ts.map +1 -0
  40. package/dist/src/integrations/todoist-client.d.ts +253 -0
  41. package/dist/src/integrations/todoist-client.d.ts.map +1 -0
  42. package/dist/src/integrations/todoist.d.ts +37 -0
  43. package/dist/src/integrations/todoist.d.ts.map +1 -0
  44. package/dist/src/integrations/vercel-client.d.ts +278 -0
  45. package/dist/src/integrations/vercel-client.d.ts.map +1 -0
  46. package/dist/src/integrations/vercel.d.ts +37 -0
  47. package/dist/src/integrations/vercel.d.ts.map +1 -0
  48. package/dist/src/integrations/zendesk-client.d.ts +395 -0
  49. package/dist/src/integrations/zendesk-client.d.ts.map +1 -0
  50. package/dist/src/integrations/zendesk.d.ts +39 -0
  51. package/dist/src/integrations/zendesk.d.ts.map +1 -0
  52. package/dist/src/server.d.ts +9 -0
  53. package/dist/src/server.d.ts.map +1 -1
  54. package/index.ts +18 -0
  55. package/package.json +2 -2
package/dist/oauth.js CHANGED
@@ -1626,6 +1626,33 @@ class MCPClientBase {
1626
1626
  if (integrationIds.includes("notion")) {
1627
1627
  this.notion = this.createIntegrationProxy("notion");
1628
1628
  }
1629
+ if (integrationIds.includes("slack")) {
1630
+ this.slack = this.createIntegrationProxy("slack");
1631
+ }
1632
+ if (integrationIds.includes("linear")) {
1633
+ this.linear = this.createIntegrationProxy("linear");
1634
+ }
1635
+ if (integrationIds.includes("vercel")) {
1636
+ this.vercel = this.createIntegrationProxy("vercel");
1637
+ }
1638
+ if (integrationIds.includes("zendesk")) {
1639
+ this.zendesk = this.createIntegrationProxy("zendesk");
1640
+ }
1641
+ if (integrationIds.includes("stripe")) {
1642
+ this.stripe = this.createIntegrationProxy("stripe");
1643
+ }
1644
+ if (integrationIds.includes("gcal")) {
1645
+ this.gcal = this.createIntegrationProxy("gcal");
1646
+ }
1647
+ if (integrationIds.includes("outlook")) {
1648
+ this.outlook = this.createIntegrationProxy("outlook");
1649
+ }
1650
+ if (integrationIds.includes("airtable")) {
1651
+ this.airtable = this.createIntegrationProxy("airtable");
1652
+ }
1653
+ if (integrationIds.includes("todoist")) {
1654
+ this.todoist = this.createIntegrationProxy("todoist");
1655
+ }
1629
1656
  this.server = this.createServerProxy();
1630
1657
  this.initializeIntegrations();
1631
1658
  }
@@ -2503,6 +2530,358 @@ var init_notion = __esm(() => {
2503
2530
  ];
2504
2531
  });
2505
2532
 
2533
+ // src/integrations/slack.ts
2534
+ function slackIntegration(config = {}) {
2535
+ const oauth = {
2536
+ provider: "slack",
2537
+ clientId: config.clientId ?? getEnv("SLACK_CLIENT_ID"),
2538
+ clientSecret: config.clientSecret ?? getEnv("SLACK_CLIENT_SECRET"),
2539
+ scopes: config.scopes || ["chat:write", "channels:read", "users:read", "search:read", "files:write"],
2540
+ redirectUri: config.redirectUri,
2541
+ config: {
2542
+ ...config
2543
+ }
2544
+ };
2545
+ return {
2546
+ id: "slack",
2547
+ tools: [...SLACK_TOOLS],
2548
+ oauth,
2549
+ async onInit(_client) {
2550
+ console.log("Slack integration initialized");
2551
+ },
2552
+ async onAfterConnect(_client) {
2553
+ console.log("Slack integration connected");
2554
+ }
2555
+ };
2556
+ }
2557
+ var SLACK_TOOLS;
2558
+ var init_slack = __esm(() => {
2559
+ SLACK_TOOLS = [
2560
+ "slack_send_message",
2561
+ "slack_list_channels",
2562
+ "slack_get_channel",
2563
+ "slack_list_users",
2564
+ "slack_get_user",
2565
+ "slack_list_messages",
2566
+ "slack_add_reaction",
2567
+ "slack_search_messages",
2568
+ "slack_upload_file"
2569
+ ];
2570
+ });
2571
+
2572
+ // src/integrations/linear.ts
2573
+ function linearIntegration(config = {}) {
2574
+ const oauth = {
2575
+ provider: "linear",
2576
+ clientId: config.clientId ?? getEnv("LINEAR_CLIENT_ID"),
2577
+ clientSecret: config.clientSecret ?? getEnv("LINEAR_CLIENT_SECRET"),
2578
+ scopes: config.scopes || ["read", "write", "issues:create"],
2579
+ redirectUri: config.redirectUri,
2580
+ config: {
2581
+ ...config
2582
+ }
2583
+ };
2584
+ return {
2585
+ id: "linear",
2586
+ tools: [...LINEAR_TOOLS],
2587
+ oauth,
2588
+ async onInit(_client) {
2589
+ console.log("Linear integration initialized");
2590
+ },
2591
+ async onAfterConnect(_client) {
2592
+ console.log("Linear integration connected");
2593
+ }
2594
+ };
2595
+ }
2596
+ var LINEAR_TOOLS;
2597
+ var init_linear = __esm(() => {
2598
+ LINEAR_TOOLS = [
2599
+ "linear_create_issue",
2600
+ "linear_list_issues",
2601
+ "linear_get_issue",
2602
+ "linear_update_issue",
2603
+ "linear_list_projects",
2604
+ "linear_list_teams",
2605
+ "linear_add_comment",
2606
+ "linear_list_labels",
2607
+ "linear_search_issues"
2608
+ ];
2609
+ });
2610
+
2611
+ // src/integrations/vercel.ts
2612
+ function vercelIntegration(config = {}) {
2613
+ const oauth = {
2614
+ provider: "vercel",
2615
+ clientId: config.clientId ?? getEnv("VERCEL_CLIENT_ID"),
2616
+ clientSecret: config.clientSecret ?? getEnv("VERCEL_CLIENT_SECRET"),
2617
+ scopes: config.scopes || [],
2618
+ redirectUri: config.redirectUri,
2619
+ config: {
2620
+ ...config
2621
+ }
2622
+ };
2623
+ return {
2624
+ id: "vercel",
2625
+ tools: [...VERCEL_TOOLS],
2626
+ oauth,
2627
+ async onInit(_client) {
2628
+ console.log("Vercel integration initialized");
2629
+ },
2630
+ async onAfterConnect(_client) {
2631
+ console.log("Vercel integration connected");
2632
+ }
2633
+ };
2634
+ }
2635
+ var VERCEL_TOOLS;
2636
+ var init_vercel = __esm(() => {
2637
+ VERCEL_TOOLS = [
2638
+ "vercel_list_projects",
2639
+ "vercel_get_project",
2640
+ "vercel_list_deployments",
2641
+ "vercel_get_deployment",
2642
+ "vercel_create_deployment",
2643
+ "vercel_cancel_deployment",
2644
+ "vercel_list_domains",
2645
+ "vercel_list_env_vars",
2646
+ "vercel_get_deployment_logs"
2647
+ ];
2648
+ });
2649
+
2650
+ // src/integrations/zendesk.ts
2651
+ function zendeskIntegration(config = {}) {
2652
+ const oauth = {
2653
+ provider: "zendesk",
2654
+ clientId: config.clientId ?? getEnv("ZENDESK_CLIENT_ID"),
2655
+ clientSecret: config.clientSecret ?? getEnv("ZENDESK_CLIENT_SECRET"),
2656
+ scopes: config.scopes || ["read", "write"],
2657
+ redirectUri: config.redirectUri,
2658
+ config: {
2659
+ subdomain: config.subdomain ?? getEnv("ZENDESK_SUBDOMAIN"),
2660
+ ...config
2661
+ }
2662
+ };
2663
+ return {
2664
+ id: "zendesk",
2665
+ tools: [...ZENDESK_TOOLS],
2666
+ oauth,
2667
+ async onInit(_client) {
2668
+ console.log("Zendesk integration initialized");
2669
+ },
2670
+ async onAfterConnect(_client) {
2671
+ console.log("Zendesk integration connected");
2672
+ }
2673
+ };
2674
+ }
2675
+ var ZENDESK_TOOLS;
2676
+ var init_zendesk = __esm(() => {
2677
+ ZENDESK_TOOLS = [
2678
+ "zendesk_list_tickets",
2679
+ "zendesk_get_ticket",
2680
+ "zendesk_create_ticket",
2681
+ "zendesk_update_ticket",
2682
+ "zendesk_add_comment",
2683
+ "zendesk_list_users",
2684
+ "zendesk_get_user",
2685
+ "zendesk_search_tickets",
2686
+ "zendesk_list_organizations"
2687
+ ];
2688
+ });
2689
+
2690
+ // src/integrations/stripe.ts
2691
+ function stripeIntegration(config = {}) {
2692
+ const oauth = {
2693
+ provider: "stripe",
2694
+ clientId: config.clientId ?? getEnv("STRIPE_CLIENT_ID"),
2695
+ clientSecret: config.clientSecret ?? getEnv("STRIPE_CLIENT_SECRET"),
2696
+ scopes: config.scopes || ["read_write"],
2697
+ redirectUri: config.redirectUri,
2698
+ config: {
2699
+ ...config
2700
+ }
2701
+ };
2702
+ return {
2703
+ id: "stripe",
2704
+ tools: [...STRIPE_TOOLS],
2705
+ oauth,
2706
+ async onInit(_client) {
2707
+ console.log("Stripe integration initialized");
2708
+ },
2709
+ async onAfterConnect(_client) {
2710
+ console.log("Stripe integration connected");
2711
+ }
2712
+ };
2713
+ }
2714
+ var STRIPE_TOOLS;
2715
+ var init_stripe = __esm(() => {
2716
+ STRIPE_TOOLS = [
2717
+ "stripe_list_customers",
2718
+ "stripe_get_customer",
2719
+ "stripe_create_customer",
2720
+ "stripe_list_payments",
2721
+ "stripe_get_payment",
2722
+ "stripe_create_payment",
2723
+ "stripe_list_invoices",
2724
+ "stripe_list_subscriptions",
2725
+ "stripe_create_subscription"
2726
+ ];
2727
+ });
2728
+
2729
+ // src/integrations/gcal.ts
2730
+ function gcalIntegration(config = {}) {
2731
+ const oauth = {
2732
+ provider: "gcal",
2733
+ clientId: config.clientId ?? getEnv("GCAL_CLIENT_ID"),
2734
+ clientSecret: config.clientSecret ?? getEnv("GCAL_CLIENT_SECRET"),
2735
+ scopes: config.scopes || ["https://www.googleapis.com/auth/calendar"],
2736
+ redirectUri: config.redirectUri,
2737
+ config: {
2738
+ ...config
2739
+ }
2740
+ };
2741
+ return {
2742
+ id: "gcal",
2743
+ tools: [...GCAL_TOOLS],
2744
+ oauth,
2745
+ async onInit(_client) {
2746
+ console.log("Google Calendar integration initialized");
2747
+ },
2748
+ async onAfterConnect(_client) {
2749
+ console.log("Google Calendar integration connected");
2750
+ }
2751
+ };
2752
+ }
2753
+ var GCAL_TOOLS;
2754
+ var init_gcal = __esm(() => {
2755
+ GCAL_TOOLS = [
2756
+ "gcal_list_calendars",
2757
+ "gcal_get_calendar",
2758
+ "gcal_list_events",
2759
+ "gcal_get_event",
2760
+ "gcal_create_event",
2761
+ "gcal_update_event",
2762
+ "gcal_delete_event",
2763
+ "gcal_list_attendees",
2764
+ "gcal_quick_add"
2765
+ ];
2766
+ });
2767
+
2768
+ // src/integrations/outlook.ts
2769
+ function outlookIntegration(config = {}) {
2770
+ const oauth = {
2771
+ provider: "outlook",
2772
+ clientId: config.clientId ?? getEnv("OUTLOOK_CLIENT_ID"),
2773
+ clientSecret: config.clientSecret ?? getEnv("OUTLOOK_CLIENT_SECRET"),
2774
+ scopes: config.scopes || ["Mail.Read", "Mail.Send", "Calendars.ReadWrite", "Contacts.Read"],
2775
+ redirectUri: config.redirectUri,
2776
+ config: {
2777
+ ...config
2778
+ }
2779
+ };
2780
+ return {
2781
+ id: "outlook",
2782
+ tools: [...OUTLOOK_TOOLS],
2783
+ oauth,
2784
+ async onInit(_client) {
2785
+ console.log("Outlook integration initialized");
2786
+ },
2787
+ async onAfterConnect(_client) {
2788
+ console.log("Outlook integration connected");
2789
+ }
2790
+ };
2791
+ }
2792
+ var OUTLOOK_TOOLS;
2793
+ var init_outlook = __esm(() => {
2794
+ OUTLOOK_TOOLS = [
2795
+ "outlook_list_messages",
2796
+ "outlook_get_message",
2797
+ "outlook_send_message",
2798
+ "outlook_list_events",
2799
+ "outlook_get_event",
2800
+ "outlook_create_event",
2801
+ "outlook_list_contacts",
2802
+ "outlook_get_contact",
2803
+ "outlook_search"
2804
+ ];
2805
+ });
2806
+
2807
+ // src/integrations/airtable.ts
2808
+ function airtableIntegration(config = {}) {
2809
+ const oauth = {
2810
+ provider: "airtable",
2811
+ clientId: config.clientId ?? getEnv("AIRTABLE_CLIENT_ID"),
2812
+ clientSecret: config.clientSecret ?? getEnv("AIRTABLE_CLIENT_SECRET"),
2813
+ scopes: config.scopes || ["data.records:read", "data.records:write", "schema.bases:read"],
2814
+ redirectUri: config.redirectUri,
2815
+ config: {
2816
+ ...config
2817
+ }
2818
+ };
2819
+ return {
2820
+ id: "airtable",
2821
+ tools: [...AIRTABLE_TOOLS],
2822
+ oauth,
2823
+ async onInit(_client) {
2824
+ console.log("Airtable integration initialized");
2825
+ },
2826
+ async onAfterConnect(_client) {
2827
+ console.log("Airtable integration connected");
2828
+ }
2829
+ };
2830
+ }
2831
+ var AIRTABLE_TOOLS;
2832
+ var init_airtable = __esm(() => {
2833
+ AIRTABLE_TOOLS = [
2834
+ "airtable_list_bases",
2835
+ "airtable_get_base",
2836
+ "airtable_list_tables",
2837
+ "airtable_get_table",
2838
+ "airtable_list_records",
2839
+ "airtable_get_record",
2840
+ "airtable_create_record",
2841
+ "airtable_update_record",
2842
+ "airtable_search_records"
2843
+ ];
2844
+ });
2845
+
2846
+ // src/integrations/todoist.ts
2847
+ function todoistIntegration(config = {}) {
2848
+ const oauth = {
2849
+ provider: "todoist",
2850
+ clientId: config.clientId ?? getEnv("TODOIST_CLIENT_ID"),
2851
+ clientSecret: config.clientSecret ?? getEnv("TODOIST_CLIENT_SECRET"),
2852
+ scopes: config.scopes || ["data:read_write"],
2853
+ redirectUri: config.redirectUri,
2854
+ config: {
2855
+ ...config
2856
+ }
2857
+ };
2858
+ return {
2859
+ id: "todoist",
2860
+ tools: [...TODOIST_TOOLS],
2861
+ oauth,
2862
+ async onInit(_client) {
2863
+ console.log("Todoist integration initialized");
2864
+ },
2865
+ async onAfterConnect(_client) {
2866
+ console.log("Todoist integration connected");
2867
+ }
2868
+ };
2869
+ }
2870
+ var TODOIST_TOOLS;
2871
+ var init_todoist = __esm(() => {
2872
+ TODOIST_TOOLS = [
2873
+ "todoist_list_projects",
2874
+ "todoist_get_project",
2875
+ "todoist_create_project",
2876
+ "todoist_list_tasks",
2877
+ "todoist_get_task",
2878
+ "todoist_create_task",
2879
+ "todoist_complete_task",
2880
+ "todoist_list_labels",
2881
+ "todoist_create_label"
2882
+ ];
2883
+ });
2884
+
2506
2885
  // src/integrations/generic.ts
2507
2886
  function genericOAuthIntegration(config) {
2508
2887
  const providerUpper = config.provider.toUpperCase().replace(/[^A-Z0-9]/g, "_");
@@ -7000,11 +7379,18 @@ var init_ai = __esm(() => {
7000
7379
  // src/server.ts
7001
7380
  var exports_server = {};
7002
7381
  __export(exports_server, {
7382
+ zendeskIntegration: () => zendeskIntegration,
7383
+ vercelIntegration: () => vercelIntegration,
7384
+ todoistIntegration: () => todoistIntegration,
7003
7385
  toSvelteKitHandler: () => toSvelteKitHandler,
7004
7386
  toSolidStartHandler: () => toSolidStartHandler,
7005
7387
  toNextJsHandler: () => toNextJsHandler,
7388
+ stripeIntegration: () => stripeIntegration,
7006
7389
  storeCodeVerifier: () => storeCodeVerifier,
7390
+ slackIntegration: () => slackIntegration,
7391
+ outlookIntegration: () => outlookIntegration,
7007
7392
  notionIntegration: () => notionIntegration,
7393
+ linearIntegration: () => linearIntegration,
7008
7394
  handleOpenAIResponse: () => handleOpenAIResponse,
7009
7395
  handleAnthropicMessage: () => handleAnthropicMessage,
7010
7396
  gmailIntegration: () => gmailIntegration,
@@ -7015,9 +7401,11 @@ __export(exports_server, {
7015
7401
  getCodeVerifier: () => getCodeVerifier,
7016
7402
  getAnthropicTools: () => getAnthropicTools,
7017
7403
  genericOAuthIntegration: () => genericOAuthIntegration,
7404
+ gcalIntegration: () => gcalIntegration,
7018
7405
  executeGoogleFunctionCalls: () => executeGoogleFunctionCalls,
7019
7406
  createSimpleIntegration: () => createSimpleIntegration,
7020
7407
  createMCPServer: () => createMCPServer,
7408
+ airtableIntegration: () => airtableIntegration,
7021
7409
  POST: () => POST,
7022
7410
  GET: () => GET
7023
7411
  });
@@ -7535,6 +7923,15 @@ var init_server = __esm(() => {
7535
7923
  init_github();
7536
7924
  init_gmail();
7537
7925
  init_notion();
7926
+ init_slack();
7927
+ init_linear();
7928
+ init_vercel();
7929
+ init_zendesk();
7930
+ init_stripe();
7931
+ init_gcal();
7932
+ init_outlook();
7933
+ init_airtable();
7934
+ init_todoist();
7538
7935
  init_generic();
7539
7936
  init_vercel_ai();
7540
7937
  init_openai();