@squadbase/connectors 0.1.2-dev.1 → 0.1.2-dev.2

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/sdk.d.ts CHANGED
@@ -34,7 +34,26 @@ interface KintoneConnectorSdk {
34
34
  * @param params - Resolved parameter values keyed by parameter slug
35
35
  * ("base-url", "username", "password")
36
36
  */
37
- declare function createClient$8(params: Record<string, string>): KintoneConnectorSdk;
37
+ declare function createClient$l(params: Record<string, string>): KintoneConnectorSdk;
38
+
39
+ interface KintoneApiTokenConnectorSdk {
40
+ /**
41
+ * Send an authenticated request to the kintone REST API.
42
+ * Interface matches `fetch` — only auth headers and base URL are added automatically.
43
+ *
44
+ * @param path - API path (e.g., "/k/v1/records.json?app=1")
45
+ * @param init - Standard RequestInit (same as fetch)
46
+ * @returns Standard Response (same as fetch)
47
+ */
48
+ request(path: string, init?: RequestInit): Promise<Response>;
49
+ }
50
+ /**
51
+ * Create a kintone client from resolved connection parameters.
52
+ *
53
+ * @param params - Resolved parameter values keyed by parameter slug
54
+ * ("base-url", "api-token")
55
+ */
56
+ declare function createClient$k(params: Record<string, string>): KintoneApiTokenConnectorSdk;
38
57
 
39
58
  interface OpenAIConnectorSdk {
40
59
  apiKey: string;
@@ -44,7 +63,7 @@ interface OpenAIConnectorSdk {
44
63
  *
45
64
  * @param params - Resolved parameter values keyed by parameter slug ("api-key")
46
65
  */
47
- declare function createClient$7(params: Record<string, string>): OpenAIConnectorSdk;
66
+ declare function createClient$j(params: Record<string, string>): OpenAIConnectorSdk;
48
67
 
49
68
  /** Shape returned by the Airtable API for a single record. */
50
69
  interface AirtableRecord {
@@ -131,7 +150,7 @@ interface AirtableConnectorSdk {
131
150
  * @param params - Resolved parameter values keyed by parameter slug
132
151
  * ("base-id", "api-key")
133
152
  */
134
- declare function createClient$6(params: Record<string, string>): AirtableConnectorSdk;
153
+ declare function createClient$i(params: Record<string, string>): AirtableConnectorSdk;
135
154
 
136
155
  interface GoogleAdsRow {
137
156
  [key: string]: unknown;
@@ -168,7 +187,7 @@ interface GoogleAdsConnectorSdk {
168
187
  * @param params - Resolved parameter values keyed by parameter slug
169
188
  * @param fetchFn - Optional fetch function (for OAuth proxy injection)
170
189
  */
171
- declare function createClient$5(params: Record<string, string>, fetchFn?: typeof fetch): GoogleAdsConnectorSdk;
190
+ declare function createClient$h(params: Record<string, string>, fetchFn?: typeof fetch): GoogleAdsConnectorSdk;
172
191
 
173
192
  interface GoogleAnalyticsConnectorSdk {
174
193
  /**
@@ -274,7 +293,7 @@ interface GoogleAnalyticsConnectorSdk {
274
293
  * @param params - Resolved parameter values keyed by parameter slug
275
294
  * ("service-account-key-json-base64", "property-id")
276
295
  */
277
- declare function createClient$4(params: Record<string, string>): GoogleAnalyticsConnectorSdk;
296
+ declare function createClient$g(params: Record<string, string>): GoogleAnalyticsConnectorSdk;
278
297
 
279
298
  interface GoogleAnalyticsOauthConnectorSdk {
280
299
  /**
@@ -378,7 +397,7 @@ interface GoogleAnalyticsOauthConnectorSdk {
378
397
  * @param params - Resolved parameter values keyed by parameter slug
379
398
  * @param fetchFn - Optional fetch function (for OAuth proxy injection)
380
399
  */
381
- declare function createClient$3(params: Record<string, string>, fetchFn?: typeof fetch): GoogleAnalyticsOauthConnectorSdk;
400
+ declare function createClient$f(params: Record<string, string>, fetchFn?: typeof fetch): GoogleAnalyticsOauthConnectorSdk;
382
401
 
383
402
  interface SpreadsheetProperties {
384
403
  title: string;
@@ -448,7 +467,7 @@ interface GoogleSheetsConnectorSdk {
448
467
  * @param params - Resolved parameter values keyed by parameter slug
449
468
  * @param fetchFn - Optional fetch function (for OAuth proxy injection)
450
469
  */
451
- declare function createClient$2(params: Record<string, string>, fetchFn?: typeof fetch): GoogleSheetsConnectorSdk;
470
+ declare function createClient$e(params: Record<string, string>, fetchFn?: typeof fetch): GoogleSheetsConnectorSdk;
452
471
 
453
472
  interface WixStoreConnectorSdk {
454
473
  /**
@@ -539,7 +558,7 @@ interface WixStoreConnectorSdk {
539
558
  * @param params - Resolved parameter values keyed by parameter slug
540
559
  * ("account-id", "site-id", "api-key")
541
560
  */
542
- declare function createClient$1(params: Record<string, string>): WixStoreConnectorSdk;
561
+ declare function createClient$d(params: Record<string, string>): WixStoreConnectorSdk;
543
562
 
544
563
  interface DbtConnectorSdk {
545
564
  /**
@@ -595,6 +614,173 @@ interface DbtConnectorSdk {
595
614
  * @param params - Resolved parameter values keyed by parameter slug
596
615
  * ("host", "account-id", "prod-env-id", "token")
597
616
  */
598
- declare function createClient(params: Record<string, string>): DbtConnectorSdk;
617
+ declare function createClient$c(params: Record<string, string>): DbtConnectorSdk;
618
+
619
+ interface GeminiConnectorSdk {
620
+ apiKey: string;
621
+ }
622
+ /**
623
+ * Create a Gemini client from resolved connection parameters.
624
+ *
625
+ * @param params - Resolved parameter values keyed by parameter slug ("api-key")
626
+ */
627
+ declare function createClient$b(params: Record<string, string>): GeminiConnectorSdk;
628
+
629
+ interface AnthropicConnectorSdk {
630
+ apiKey: string;
631
+ }
632
+ /**
633
+ * Create an Anthropic client from resolved connection parameters.
634
+ *
635
+ * @param params - Resolved parameter values keyed by parameter slug ("api-key")
636
+ */
637
+ declare function createClient$a(params: Record<string, string>): AnthropicConnectorSdk;
638
+
639
+ interface HubSpotConnectorSdk {
640
+ /**
641
+ * Send an authenticated request to the HubSpot API.
642
+ *
643
+ * @param path - API path (e.g., "/crm/v3/objects/contacts")
644
+ * @param init - Standard RequestInit (same as fetch)
645
+ * @returns Standard Response (same as fetch)
646
+ */
647
+ request(path: string, init?: RequestInit): Promise<Response>;
648
+ }
649
+ /**
650
+ * Create a HubSpot client from resolved connection parameters.
651
+ *
652
+ * @param params - Resolved parameter values keyed by parameter slug
653
+ * @param fetchFn - Optional fetch function (for OAuth proxy injection)
654
+ */
655
+ declare function createClient$9(_params: Record<string, string>, fetchFn?: typeof fetch): HubSpotConnectorSdk;
656
+
657
+ interface StripeConnectorSdk {
658
+ /**
659
+ * Send an authenticated request to the Stripe API.
660
+ *
661
+ * @param path - API path (e.g., "/v1/charges", "/v1/customers")
662
+ * @param init - Standard RequestInit (same as fetch)
663
+ * @returns Standard Response (same as fetch)
664
+ */
665
+ request(path: string, init?: RequestInit): Promise<Response>;
666
+ }
667
+ /**
668
+ * Create a Stripe client from resolved connection parameters.
669
+ *
670
+ * @param params - Resolved parameter values keyed by parameter slug
671
+ * @param fetchFn - Optional fetch function (for OAuth proxy injection)
672
+ */
673
+ declare function createClient$8(_params: Record<string, string>, fetchFn?: typeof fetch): StripeConnectorSdk;
674
+
675
+ interface AirtableOauthConnectorSdk {
676
+ /**
677
+ * Send an authenticated request to the Airtable REST API.
678
+ *
679
+ * The placeholder `{baseId}` in the path is automatically replaced with the
680
+ * configured Base ID if available.
681
+ *
682
+ * @param path - API path (e.g., "/{baseId}/TableName", "/meta/bases/{baseId}/tables")
683
+ * @param init - Standard RequestInit (same as fetch)
684
+ * @returns Standard Response (same as fetch)
685
+ */
686
+ request(path: string, init?: RequestInit): Promise<Response>;
687
+ }
688
+ /**
689
+ * Create an Airtable OAuth client from resolved connection parameters.
690
+ *
691
+ * @param params - Resolved parameter values keyed by parameter slug
692
+ * @param fetchFn - Optional fetch function (for OAuth proxy injection)
693
+ */
694
+ declare function createClient$7(params: Record<string, string>, fetchFn?: typeof fetch): AirtableOauthConnectorSdk;
695
+
696
+ interface AmplitudeConnectorSdk {
697
+ apiKey: string;
698
+ secretKey: string;
699
+ }
700
+ /**
701
+ * Create an Amplitude client from resolved connection parameters.
702
+ *
703
+ * @param params - Resolved parameter values keyed by parameter slug
704
+ */
705
+ declare function createClient$6(params: Record<string, string>): AmplitudeConnectorSdk;
706
+
707
+ interface AttioConnectorSdk {
708
+ apiKey: string;
709
+ }
710
+ /**
711
+ * Create an Attio client from resolved connection parameters.
712
+ *
713
+ * @param params - Resolved parameter values keyed by parameter slug
714
+ */
715
+ declare function createClient$5(params: Record<string, string>): AttioConnectorSdk;
716
+
717
+ interface ShopifyConnectorSdk {
718
+ accessToken: string;
719
+ storeDomain: string;
720
+ }
721
+ /**
722
+ * Create a Shopify client from resolved connection parameters.
723
+ *
724
+ * @param params - Resolved parameter values keyed by parameter slug
725
+ */
726
+ declare function createClient$4(params: Record<string, string>): ShopifyConnectorSdk;
727
+
728
+ interface SlackConnectorSdk {
729
+ botToken: string;
730
+ }
731
+ /**
732
+ * Create a Slack client from resolved connection parameters.
733
+ *
734
+ * @param params - Resolved parameter values keyed by parameter slug
735
+ */
736
+ declare function createClient$3(params: Record<string, string>): SlackConnectorSdk;
737
+
738
+ interface ShopifyOauthConnectorSdk {
739
+ /**
740
+ * Send an authenticated request to the Shopify Admin API.
741
+ *
742
+ * @param path - API path (e.g., "/admin/api/2024-10/products.json")
743
+ * @param init - Standard RequestInit (same as fetch)
744
+ * @returns Standard Response (same as fetch)
745
+ */
746
+ request(path: string, init?: RequestInit): Promise<Response>;
747
+ }
748
+ /**
749
+ * Create a Shopify OAuth client from resolved connection parameters.
750
+ *
751
+ * @param params - Resolved parameter values keyed by parameter slug
752
+ * @param fetchFn - Optional fetch function (for OAuth proxy injection)
753
+ */
754
+ declare function createClient$2(_params: Record<string, string>, fetchFn?: typeof fetch): ShopifyOauthConnectorSdk;
755
+
756
+ interface MsTeamsConnectorSdk {
757
+ clientId: string;
758
+ clientSecret: string;
759
+ tenantId: string;
760
+ }
761
+ /**
762
+ * Create a Microsoft Teams client from resolved connection parameters.
763
+ *
764
+ * @param params - Resolved parameter values keyed by parameter slug
765
+ */
766
+ declare function createClient$1(params: Record<string, string>): MsTeamsConnectorSdk;
767
+
768
+ interface MsTeamsOauthConnectorSdk {
769
+ /**
770
+ * Send an authenticated request to the Microsoft Graph API.
771
+ *
772
+ * @param path - API path (e.g., "/v1.0/me/joinedTeams", "/v1.0/teams/{id}/channels")
773
+ * @param init - Standard RequestInit (same as fetch)
774
+ * @returns Standard Response (same as fetch)
775
+ */
776
+ request(path: string, init?: RequestInit): Promise<Response>;
777
+ }
778
+ /**
779
+ * Create a Microsoft Teams OAuth client from resolved connection parameters.
780
+ *
781
+ * @param params - Resolved parameter values keyed by parameter slug
782
+ * @param fetchFn - Optional fetch function (for OAuth proxy injection)
783
+ */
784
+ declare function createClient(_params: Record<string, string>, fetchFn?: typeof fetch): MsTeamsOauthConnectorSdk;
599
785
 
600
- export { type AirtableConnectorSdk, type DbtConnectorSdk, type GoogleAdsConnectorSdk, type GoogleAnalyticsConnectorSdk, type GoogleAnalyticsOauthConnectorSdk, type GoogleSheetsConnectorSdk, type KintoneConnectorSdk, type OpenAIConnectorSdk, type WixStoreConnectorSdk, createClient$6 as airtable, createClient as dbt, createClient$5 as googleAds, createClient$4 as googleAnalytics, createClient$3 as googleAnalyticsOauth, createClient$2 as googleSheets, createClient$8 as kintone, createClient$7 as openai, createClient$1 as wixStore };
786
+ export { type AirtableConnectorSdk, type AirtableOauthConnectorSdk, type AmplitudeConnectorSdk, type AnthropicConnectorSdk, type AttioConnectorSdk, type DbtConnectorSdk, type GeminiConnectorSdk, type GoogleAdsConnectorSdk, type GoogleAnalyticsConnectorSdk, type GoogleAnalyticsOauthConnectorSdk, type GoogleSheetsConnectorSdk, type HubSpotConnectorSdk, type KintoneApiTokenConnectorSdk, type KintoneConnectorSdk, type MsTeamsConnectorSdk, type MsTeamsOauthConnectorSdk, type OpenAIConnectorSdk, type ShopifyConnectorSdk, type ShopifyOauthConnectorSdk, type SlackConnectorSdk, type StripeConnectorSdk, type WixStoreConnectorSdk, createClient$i as airtable, createClient$7 as airtableOauth, createClient$6 as amplitude, createClient$a as anthropic, createClient$5 as attio, createClient$c as dbt, createClient$b as gemini, createClient$h as googleAds, createClient$g as googleAnalytics, createClient$f as googleAnalyticsOauth, createClient$e as googleSheets, createClient$9 as hubspotOauth, createClient$l as kintone, createClient$k as kintoneApiToken, createClient$1 as msTeams, createClient as msTeamsOauth, createClient$j as openai, createClient$4 as shopify, createClient$2 as shopifyOauth, createClient$3 as slack, createClient$8 as stripeOauth, createClient$d as wixStore };
package/dist/sdk.js CHANGED
@@ -1,5 +1,14 @@
1
1
  import {
2
2
  parameters,
3
+ parameters10,
4
+ parameters11,
5
+ parameters12,
6
+ parameters13,
7
+ parameters14,
8
+ parameters15,
9
+ parameters16,
10
+ parameters17,
11
+ parameters18,
3
12
  parameters2,
4
13
  parameters3,
5
14
  parameters4,
@@ -8,18 +17,18 @@ import {
8
17
  parameters7,
9
18
  parameters8,
10
19
  parameters9
11
- } from "./chunk-LB7J6VXK.js";
20
+ } from "./chunk-HHVJKPCD.js";
12
21
 
13
22
  // src/connectors/kintone/sdk/index.ts
14
23
  function createClient(params) {
15
- const baseUrl = params[parameters6.baseUrl.slug];
16
- const username = params[parameters6.username.slug];
17
- const password = params[parameters6.password.slug];
24
+ const baseUrl = params[parameters7.baseUrl.slug];
25
+ const username = params[parameters7.username.slug];
26
+ const password = params[parameters7.password.slug];
18
27
  if (!baseUrl || !username || !password) {
19
28
  const required = [
20
- parameters6.baseUrl.slug,
21
- parameters6.username.slug,
22
- parameters6.password.slug
29
+ parameters7.baseUrl.slug,
30
+ parameters7.username.slug,
31
+ parameters7.password.slug
23
32
  ];
24
33
  const missing = required.filter((s) => !params[s]);
25
34
  throw new Error(
@@ -79,12 +88,33 @@ function createClient(params) {
79
88
  };
80
89
  }
81
90
 
82
- // src/connectors/openai/sdk/index.ts
91
+ // src/connectors/kintone-api-token/sdk/index.ts
83
92
  function createClient2(params) {
84
- const apiKey = params[parameters9.apiKey.slug];
93
+ const baseUrl = params[parameters8.baseUrl.slug];
94
+ const apiToken = params[parameters8.apiToken.slug];
95
+ if (!baseUrl || !apiToken) {
96
+ const required = [parameters8.baseUrl.slug, parameters8.apiToken.slug];
97
+ const missing = required.filter((s) => !params[s]);
98
+ throw new Error(
99
+ `kintone: missing required parameters: ${missing.join(", ")}`
100
+ );
101
+ }
102
+ return {
103
+ request(path, init) {
104
+ const url = `${baseUrl.replace(/\/+$/, "")}${path}`;
105
+ const headers = new Headers(init?.headers);
106
+ headers.set("X-Cybozu-API-Token", apiToken);
107
+ return fetch(url, { ...init, headers });
108
+ }
109
+ };
110
+ }
111
+
112
+ // src/connectors/openai/sdk/index.ts
113
+ function createClient3(params) {
114
+ const apiKey = params[parameters11.apiKey.slug];
85
115
  if (!apiKey) {
86
116
  throw new Error(
87
- `openai: missing required parameter: ${parameters9.apiKey.slug}`
117
+ `openai: missing required parameter: ${parameters11.apiKey.slug}`
88
118
  );
89
119
  }
90
120
  return { apiKey };
@@ -92,7 +122,7 @@ function createClient2(params) {
92
122
 
93
123
  // src/connectors/airtable/sdk/index.ts
94
124
  var BASE_URL = "https://api.airtable.com/v0";
95
- function createClient3(params) {
125
+ function createClient4(params) {
96
126
  const baseId = params[parameters.baseId.slug];
97
127
  const apiKey = params[parameters.apiKey.slug];
98
128
  if (!baseId || !apiKey) {
@@ -225,7 +255,7 @@ function createClient3(params) {
225
255
 
226
256
  // src/connectors/google-ads-oauth/sdk/index.ts
227
257
  var BASE_URL2 = "https://googleads.googleapis.com/v18/";
228
- function createClient4(params, fetchFn = fetch) {
258
+ function createClient5(params, fetchFn = fetch) {
229
259
  const rawCustomerId = params[parameters2.customerId.slug];
230
260
  const defaultCustomerId = rawCustomerId?.replace(/-/g, "") ?? "";
231
261
  const developerToken = params[parameters2.developerToken.slug];
@@ -324,7 +354,7 @@ function buildJwt(clientEmail, privateKey, nowSec) {
324
354
  const signature = base64url(sign.sign(privateKey));
325
355
  return `${signingInput}.${signature}`;
326
356
  }
327
- function createClient5(params) {
357
+ function createClient6(params) {
328
358
  const serviceAccountKeyJsonBase64 = params[parameters3.serviceAccountKeyJsonBase64.slug];
329
359
  const propertyId = params[parameters3.propertyId.slug];
330
360
  if (!serviceAccountKeyJsonBase64 || !propertyId) {
@@ -454,7 +484,7 @@ function createClient5(params) {
454
484
 
455
485
  // src/connectors/google-analytics-oauth/sdk/index.ts
456
486
  var BASE_URL4 = "https://analyticsdata.googleapis.com/v1beta/";
457
- function createClient6(params, fetchFn = fetch) {
487
+ function createClient7(params, fetchFn = fetch) {
458
488
  const propertyId = params[parameters4.propertyId.slug];
459
489
  function resolvePropertyId() {
460
490
  if (!propertyId) {
@@ -534,7 +564,7 @@ function createClient6(params, fetchFn = fetch) {
534
564
 
535
565
  // src/connectors/google-sheets-oauth/sdk/index.ts
536
566
  var BASE_URL5 = "https://sheets.googleapis.com/v4/spreadsheets";
537
- function createClient7(params, fetchFn = fetch) {
567
+ function createClient8(params, fetchFn = fetch) {
538
568
  const defaultSpreadsheetId = params[parameters5.spreadsheetId.slug];
539
569
  function resolveSpreadsheetId(override) {
540
570
  const id = override ?? defaultSpreadsheetId;
@@ -599,15 +629,15 @@ function createClient7(params, fetchFn = fetch) {
599
629
  }
600
630
 
601
631
  // src/connectors/wix-store/sdk/index.ts
602
- function createClient8(params) {
603
- const accountId = params[parameters7.accountId.slug];
604
- const siteId = params[parameters7.siteId.slug];
605
- const apiKey = params[parameters7.apiKey.slug];
632
+ function createClient9(params) {
633
+ const accountId = params[parameters9.accountId.slug];
634
+ const siteId = params[parameters9.siteId.slug];
635
+ const apiKey = params[parameters9.apiKey.slug];
606
636
  if (!accountId || !siteId || !apiKey) {
607
637
  const required = [
608
- parameters7.accountId.slug,
609
- parameters7.siteId.slug,
610
- parameters7.apiKey.slug
638
+ parameters9.accountId.slug,
639
+ parameters9.siteId.slug,
640
+ parameters9.apiKey.slug
611
641
  ];
612
642
  const missing = required.filter((s) => !params[s]);
613
643
  throw new Error(
@@ -725,15 +755,15 @@ function createClient8(params) {
725
755
  }
726
756
 
727
757
  // src/connectors/dbt/sdk/index.ts
728
- function createClient9(params) {
729
- const host = params[parameters8.host.slug];
730
- const prodEnvId = params[parameters8.prodEnvId.slug];
731
- const token = params[parameters8.token.slug];
758
+ function createClient10(params) {
759
+ const host = params[parameters10.host.slug];
760
+ const prodEnvId = params[parameters10.prodEnvId.slug];
761
+ const token = params[parameters10.token.slug];
732
762
  if (!host || !prodEnvId || !token) {
733
763
  const required = [
734
- parameters8.host.slug,
735
- parameters8.prodEnvId.slug,
736
- parameters8.token.slug
764
+ parameters10.host.slug,
765
+ parameters10.prodEnvId.slug,
766
+ parameters10.token.slug
737
767
  ];
738
768
  const missing = required.filter((s) => !params[s]);
739
769
  throw new Error(
@@ -958,14 +988,178 @@ function createClient9(params) {
958
988
  }
959
989
  };
960
990
  }
991
+
992
+ // src/connectors/gemini/sdk/index.ts
993
+ function createClient11(params) {
994
+ const apiKey = params[parameters12.apiKey.slug];
995
+ if (!apiKey) {
996
+ throw new Error(
997
+ `gemini: missing required parameter: ${parameters12.apiKey.slug}`
998
+ );
999
+ }
1000
+ return { apiKey };
1001
+ }
1002
+
1003
+ // src/connectors/anthropic/sdk/index.ts
1004
+ function createClient12(params) {
1005
+ const apiKey = params[parameters13.apiKey.slug];
1006
+ if (!apiKey) {
1007
+ throw new Error(
1008
+ `anthropic: missing required parameter: ${parameters13.apiKey.slug}`
1009
+ );
1010
+ }
1011
+ return { apiKey };
1012
+ }
1013
+
1014
+ // src/connectors/hubspot-oauth/sdk/index.ts
1015
+ var BASE_URL6 = "https://api.hubapi.com";
1016
+ function createClient13(_params, fetchFn = fetch) {
1017
+ function request(path, init) {
1018
+ const url = `${BASE_URL6}${path.startsWith("/") ? "" : "/"}${path}`;
1019
+ return fetchFn(url, init);
1020
+ }
1021
+ return { request };
1022
+ }
1023
+
1024
+ // src/connectors/stripe-oauth/sdk/index.ts
1025
+ var BASE_URL7 = "https://api.stripe.com";
1026
+ function createClient14(_params, fetchFn = fetch) {
1027
+ function request(path, init) {
1028
+ const url = `${BASE_URL7}${path.startsWith("/") ? "" : "/"}${path}`;
1029
+ return fetchFn(url, init);
1030
+ }
1031
+ return { request };
1032
+ }
1033
+
1034
+ // src/connectors/airtable-oauth/sdk/index.ts
1035
+ var BASE_URL8 = "https://api.airtable.com/v0";
1036
+ function createClient15(params, fetchFn = fetch) {
1037
+ const defaultBaseId = params[parameters6.baseId.slug];
1038
+ function request(path, init) {
1039
+ const resolvedPath = defaultBaseId ? path.replace(/\{baseId\}/g, defaultBaseId) : path;
1040
+ const url = `${BASE_URL8}${resolvedPath.startsWith("/") ? "" : "/"}${resolvedPath}`;
1041
+ return fetchFn(url, init);
1042
+ }
1043
+ return { request };
1044
+ }
1045
+
1046
+ // src/connectors/amplitude/sdk/index.ts
1047
+ function createClient16(params) {
1048
+ const apiKey = params[parameters14.apiKey.slug];
1049
+ const secretKey = params[parameters14.secretKey.slug];
1050
+ if (!apiKey) {
1051
+ throw new Error(
1052
+ `amplitude: missing required parameter: ${parameters14.apiKey.slug}`
1053
+ );
1054
+ }
1055
+ if (!secretKey) {
1056
+ throw new Error(
1057
+ `amplitude: missing required parameter: ${parameters14.secretKey.slug}`
1058
+ );
1059
+ }
1060
+ return { apiKey, secretKey };
1061
+ }
1062
+
1063
+ // src/connectors/attio/sdk/index.ts
1064
+ function createClient17(params) {
1065
+ const apiKey = params[parameters15.apiKey.slug];
1066
+ if (!apiKey) {
1067
+ throw new Error(
1068
+ `attio: missing required parameter: ${parameters15.apiKey.slug}`
1069
+ );
1070
+ }
1071
+ return { apiKey };
1072
+ }
1073
+
1074
+ // src/connectors/shopify/sdk/index.ts
1075
+ function createClient18(params) {
1076
+ const accessToken = params[parameters16.accessToken.slug];
1077
+ const storeDomain = params[parameters16.storeDomain.slug];
1078
+ if (!accessToken) {
1079
+ throw new Error(
1080
+ `shopify: missing required parameter: ${parameters16.accessToken.slug}`
1081
+ );
1082
+ }
1083
+ if (!storeDomain) {
1084
+ throw new Error(
1085
+ `shopify: missing required parameter: ${parameters16.storeDomain.slug}`
1086
+ );
1087
+ }
1088
+ return { accessToken, storeDomain };
1089
+ }
1090
+
1091
+ // src/connectors/slack/sdk/index.ts
1092
+ function createClient19(params) {
1093
+ const botToken = params[parameters17.botToken.slug];
1094
+ if (!botToken) {
1095
+ throw new Error(
1096
+ `slack: missing required parameter: ${parameters17.botToken.slug}`
1097
+ );
1098
+ }
1099
+ return { botToken };
1100
+ }
1101
+
1102
+ // src/connectors/shopify-oauth/sdk/index.ts
1103
+ function createClient20(_params, fetchFn = fetch) {
1104
+ function request(path, init) {
1105
+ return fetchFn(path, init);
1106
+ }
1107
+ return { request };
1108
+ }
1109
+
1110
+ // src/connectors/ms-teams/sdk/index.ts
1111
+ function createClient21(params) {
1112
+ const clientId = params[parameters18.clientId.slug];
1113
+ const clientSecret = params[parameters18.clientSecret.slug];
1114
+ const tenantId = params[parameters18.tenantId.slug];
1115
+ if (!clientId) {
1116
+ throw new Error(
1117
+ `ms-teams: missing required parameter: ${parameters18.clientId.slug}`
1118
+ );
1119
+ }
1120
+ if (!clientSecret) {
1121
+ throw new Error(
1122
+ `ms-teams: missing required parameter: ${parameters18.clientSecret.slug}`
1123
+ );
1124
+ }
1125
+ if (!tenantId) {
1126
+ throw new Error(
1127
+ `ms-teams: missing required parameter: ${parameters18.tenantId.slug}`
1128
+ );
1129
+ }
1130
+ return { clientId, clientSecret, tenantId };
1131
+ }
1132
+
1133
+ // src/connectors/ms-teams-oauth/sdk/index.ts
1134
+ var BASE_URL9 = "https://graph.microsoft.com";
1135
+ function createClient22(_params, fetchFn = fetch) {
1136
+ function request(path, init) {
1137
+ const url = `${BASE_URL9}${path.startsWith("/") ? "" : "/"}${path}`;
1138
+ return fetchFn(url, init);
1139
+ }
1140
+ return { request };
1141
+ }
961
1142
  export {
962
- createClient3 as airtable,
963
- createClient9 as dbt,
964
- createClient4 as googleAds,
965
- createClient5 as googleAnalytics,
966
- createClient6 as googleAnalyticsOauth,
967
- createClient7 as googleSheets,
1143
+ createClient4 as airtable,
1144
+ createClient15 as airtableOauth,
1145
+ createClient16 as amplitude,
1146
+ createClient12 as anthropic,
1147
+ createClient17 as attio,
1148
+ createClient10 as dbt,
1149
+ createClient11 as gemini,
1150
+ createClient5 as googleAds,
1151
+ createClient6 as googleAnalytics,
1152
+ createClient7 as googleAnalyticsOauth,
1153
+ createClient8 as googleSheets,
1154
+ createClient13 as hubspotOauth,
968
1155
  createClient as kintone,
969
- createClient2 as openai,
970
- createClient8 as wixStore
1156
+ createClient2 as kintoneApiToken,
1157
+ createClient21 as msTeams,
1158
+ createClient22 as msTeamsOauth,
1159
+ createClient3 as openai,
1160
+ createClient18 as shopify,
1161
+ createClient20 as shopifyOauth,
1162
+ createClient19 as slack,
1163
+ createClient14 as stripeOauth,
1164
+ createClient9 as wixStore
971
1165
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squadbase/connectors",
3
- "version": "0.1.2-dev.1",
3
+ "version": "0.1.2-dev.2",
4
4
  "description": "Squadbase Connectors",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",