@squadbase/vite-server 0.1.3-dev.17 → 0.1.3-dev.18
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/cli/index.js +302 -98
- package/dist/connectors/airtable-oauth.js +27 -1
- package/dist/connectors/airtable.js +27 -1
- package/dist/connectors/amplitude.js +27 -1
- package/dist/connectors/anthropic.js +27 -1
- package/dist/connectors/asana.js +27 -1
- package/dist/connectors/attio.js +27 -1
- package/dist/connectors/backlog-api-key.js +27 -1
- package/dist/connectors/customerio.js +27 -1
- package/dist/connectors/dbt.js +27 -1
- package/dist/connectors/gamma.js +27 -1
- package/dist/connectors/gemini.js +27 -1
- package/dist/connectors/gmail-oauth.js +49 -3
- package/dist/connectors/gmail.js +36 -10
- package/dist/connectors/google-ads.js +56 -12
- package/dist/connectors/google-analytics-oauth.js +45 -3
- package/dist/connectors/google-analytics.js +33 -7
- package/dist/connectors/google-calendar-oauth.js +45 -3
- package/dist/connectors/google-calendar.js +45 -15
- package/dist/connectors/google-docs.js +58 -12
- package/dist/connectors/google-drive.js +69 -11
- package/dist/connectors/google-sheets.js +63 -11
- package/dist/connectors/google-slides.js +65 -13
- package/dist/connectors/grafana.js +27 -1
- package/dist/connectors/hubspot-oauth.js +27 -1
- package/dist/connectors/hubspot.js +27 -1
- package/dist/connectors/intercom-oauth.js +27 -1
- package/dist/connectors/intercom.js +27 -1
- package/dist/connectors/jira-api-key.js +27 -1
- package/dist/connectors/kintone-api-token.js +35 -9
- package/dist/connectors/kintone.js +27 -1
- package/dist/connectors/linkedin-ads.js +27 -1
- package/dist/connectors/mailchimp-oauth.js +27 -1
- package/dist/connectors/mailchimp.js +27 -1
- package/dist/connectors/mixpanel.js +27 -1
- package/dist/connectors/notion-oauth.js +27 -1
- package/dist/connectors/notion.js +27 -1
- package/dist/connectors/openai.js +27 -1
- package/dist/connectors/sentry.js +27 -1
- package/dist/connectors/shopify-oauth.js +27 -1
- package/dist/connectors/shopify.js +27 -1
- package/dist/connectors/stripe-api-key.js +27 -1
- package/dist/connectors/stripe-oauth.js +27 -1
- package/dist/connectors/wix-store.js +27 -1
- package/dist/connectors/zendesk-oauth.js +27 -1
- package/dist/connectors/zendesk.js +27 -1
- package/dist/index.js +302 -98
- package/dist/main.js +302 -98
- package/dist/vite-plugin.js +302 -98
- package/package.json +1 -1
|
@@ -174,7 +174,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
174
174
|
return result;
|
|
175
175
|
}
|
|
176
176
|
static deriveKey(slug, authType) {
|
|
177
|
-
|
|
177
|
+
if (authType) return `${slug}-${authType}`;
|
|
178
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
179
|
+
// user-password
|
|
180
|
+
"postgresql": "user-password",
|
|
181
|
+
"mysql": "user-password",
|
|
182
|
+
"clickhouse": "user-password",
|
|
183
|
+
"kintone": "user-password",
|
|
184
|
+
"squadbase-db": "user-password",
|
|
185
|
+
// service-account
|
|
186
|
+
"snowflake": "service-account",
|
|
187
|
+
"bigquery": "service-account",
|
|
188
|
+
"google-analytics": "service-account",
|
|
189
|
+
"google-calendar": "service-account",
|
|
190
|
+
"aws-athena": "service-account",
|
|
191
|
+
"redshift": "service-account",
|
|
192
|
+
// api-key
|
|
193
|
+
"databricks": "api-key",
|
|
194
|
+
"dbt": "api-key",
|
|
195
|
+
"airtable": "api-key",
|
|
196
|
+
"openai": "api-key",
|
|
197
|
+
"gemini": "api-key",
|
|
198
|
+
"anthropic": "api-key",
|
|
199
|
+
"wix-store": "api-key"
|
|
200
|
+
};
|
|
201
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
202
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
203
|
+
return slug;
|
|
178
204
|
}
|
|
179
205
|
};
|
|
180
206
|
|
|
@@ -304,7 +304,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
304
304
|
return result;
|
|
305
305
|
}
|
|
306
306
|
static deriveKey(slug, authType) {
|
|
307
|
-
|
|
307
|
+
if (authType) return `${slug}-${authType}`;
|
|
308
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
309
|
+
// user-password
|
|
310
|
+
"postgresql": "user-password",
|
|
311
|
+
"mysql": "user-password",
|
|
312
|
+
"clickhouse": "user-password",
|
|
313
|
+
"kintone": "user-password",
|
|
314
|
+
"squadbase-db": "user-password",
|
|
315
|
+
// service-account
|
|
316
|
+
"snowflake": "service-account",
|
|
317
|
+
"bigquery": "service-account",
|
|
318
|
+
"google-analytics": "service-account",
|
|
319
|
+
"google-calendar": "service-account",
|
|
320
|
+
"aws-athena": "service-account",
|
|
321
|
+
"redshift": "service-account",
|
|
322
|
+
// api-key
|
|
323
|
+
"databricks": "api-key",
|
|
324
|
+
"dbt": "api-key",
|
|
325
|
+
"airtable": "api-key",
|
|
326
|
+
"openai": "api-key",
|
|
327
|
+
"gemini": "api-key",
|
|
328
|
+
"anthropic": "api-key",
|
|
329
|
+
"wix-store": "api-key"
|
|
330
|
+
};
|
|
331
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
332
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
333
|
+
return slug;
|
|
308
334
|
}
|
|
309
335
|
};
|
|
310
336
|
|
|
@@ -264,7 +264,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
264
264
|
return result;
|
|
265
265
|
}
|
|
266
266
|
static deriveKey(slug, authType) {
|
|
267
|
-
|
|
267
|
+
if (authType) return `${slug}-${authType}`;
|
|
268
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
269
|
+
// user-password
|
|
270
|
+
"postgresql": "user-password",
|
|
271
|
+
"mysql": "user-password",
|
|
272
|
+
"clickhouse": "user-password",
|
|
273
|
+
"kintone": "user-password",
|
|
274
|
+
"squadbase-db": "user-password",
|
|
275
|
+
// service-account
|
|
276
|
+
"snowflake": "service-account",
|
|
277
|
+
"bigquery": "service-account",
|
|
278
|
+
"google-analytics": "service-account",
|
|
279
|
+
"google-calendar": "service-account",
|
|
280
|
+
"aws-athena": "service-account",
|
|
281
|
+
"redshift": "service-account",
|
|
282
|
+
// api-key
|
|
283
|
+
"databricks": "api-key",
|
|
284
|
+
"dbt": "api-key",
|
|
285
|
+
"airtable": "api-key",
|
|
286
|
+
"openai": "api-key",
|
|
287
|
+
"gemini": "api-key",
|
|
288
|
+
"anthropic": "api-key",
|
|
289
|
+
"wix-store": "api-key"
|
|
290
|
+
};
|
|
291
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
292
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
293
|
+
return slug;
|
|
268
294
|
}
|
|
269
295
|
};
|
|
270
296
|
|
|
@@ -131,7 +131,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
131
131
|
return result;
|
|
132
132
|
}
|
|
133
133
|
static deriveKey(slug, authType) {
|
|
134
|
-
|
|
134
|
+
if (authType) return `${slug}-${authType}`;
|
|
135
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
136
|
+
// user-password
|
|
137
|
+
"postgresql": "user-password",
|
|
138
|
+
"mysql": "user-password",
|
|
139
|
+
"clickhouse": "user-password",
|
|
140
|
+
"kintone": "user-password",
|
|
141
|
+
"squadbase-db": "user-password",
|
|
142
|
+
// service-account
|
|
143
|
+
"snowflake": "service-account",
|
|
144
|
+
"bigquery": "service-account",
|
|
145
|
+
"google-analytics": "service-account",
|
|
146
|
+
"google-calendar": "service-account",
|
|
147
|
+
"aws-athena": "service-account",
|
|
148
|
+
"redshift": "service-account",
|
|
149
|
+
// api-key
|
|
150
|
+
"databricks": "api-key",
|
|
151
|
+
"dbt": "api-key",
|
|
152
|
+
"airtable": "api-key",
|
|
153
|
+
"openai": "api-key",
|
|
154
|
+
"gemini": "api-key",
|
|
155
|
+
"anthropic": "api-key",
|
|
156
|
+
"wix-store": "api-key"
|
|
157
|
+
};
|
|
158
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
159
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
160
|
+
return slug;
|
|
135
161
|
}
|
|
136
162
|
};
|
|
137
163
|
|
package/dist/connectors/asana.js
CHANGED
|
@@ -301,7 +301,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
301
301
|
return result;
|
|
302
302
|
}
|
|
303
303
|
static deriveKey(slug, authType) {
|
|
304
|
-
|
|
304
|
+
if (authType) return `${slug}-${authType}`;
|
|
305
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
306
|
+
// user-password
|
|
307
|
+
"postgresql": "user-password",
|
|
308
|
+
"mysql": "user-password",
|
|
309
|
+
"clickhouse": "user-password",
|
|
310
|
+
"kintone": "user-password",
|
|
311
|
+
"squadbase-db": "user-password",
|
|
312
|
+
// service-account
|
|
313
|
+
"snowflake": "service-account",
|
|
314
|
+
"bigquery": "service-account",
|
|
315
|
+
"google-analytics": "service-account",
|
|
316
|
+
"google-calendar": "service-account",
|
|
317
|
+
"aws-athena": "service-account",
|
|
318
|
+
"redshift": "service-account",
|
|
319
|
+
// api-key
|
|
320
|
+
"databricks": "api-key",
|
|
321
|
+
"dbt": "api-key",
|
|
322
|
+
"airtable": "api-key",
|
|
323
|
+
"openai": "api-key",
|
|
324
|
+
"gemini": "api-key",
|
|
325
|
+
"anthropic": "api-key",
|
|
326
|
+
"wix-store": "api-key"
|
|
327
|
+
};
|
|
328
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
329
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
330
|
+
return slug;
|
|
305
331
|
}
|
|
306
332
|
};
|
|
307
333
|
|
package/dist/connectors/attio.js
CHANGED
|
@@ -254,7 +254,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
254
254
|
return result;
|
|
255
255
|
}
|
|
256
256
|
static deriveKey(slug, authType) {
|
|
257
|
-
|
|
257
|
+
if (authType) return `${slug}-${authType}`;
|
|
258
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
259
|
+
// user-password
|
|
260
|
+
"postgresql": "user-password",
|
|
261
|
+
"mysql": "user-password",
|
|
262
|
+
"clickhouse": "user-password",
|
|
263
|
+
"kintone": "user-password",
|
|
264
|
+
"squadbase-db": "user-password",
|
|
265
|
+
// service-account
|
|
266
|
+
"snowflake": "service-account",
|
|
267
|
+
"bigquery": "service-account",
|
|
268
|
+
"google-analytics": "service-account",
|
|
269
|
+
"google-calendar": "service-account",
|
|
270
|
+
"aws-athena": "service-account",
|
|
271
|
+
"redshift": "service-account",
|
|
272
|
+
// api-key
|
|
273
|
+
"databricks": "api-key",
|
|
274
|
+
"dbt": "api-key",
|
|
275
|
+
"airtable": "api-key",
|
|
276
|
+
"openai": "api-key",
|
|
277
|
+
"gemini": "api-key",
|
|
278
|
+
"anthropic": "api-key",
|
|
279
|
+
"wix-store": "api-key"
|
|
280
|
+
};
|
|
281
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
282
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
283
|
+
return slug;
|
|
258
284
|
}
|
|
259
285
|
};
|
|
260
286
|
|
|
@@ -199,7 +199,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
199
199
|
return result;
|
|
200
200
|
}
|
|
201
201
|
static deriveKey(slug, authType) {
|
|
202
|
-
|
|
202
|
+
if (authType) return `${slug}-${authType}`;
|
|
203
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
204
|
+
// user-password
|
|
205
|
+
"postgresql": "user-password",
|
|
206
|
+
"mysql": "user-password",
|
|
207
|
+
"clickhouse": "user-password",
|
|
208
|
+
"kintone": "user-password",
|
|
209
|
+
"squadbase-db": "user-password",
|
|
210
|
+
// service-account
|
|
211
|
+
"snowflake": "service-account",
|
|
212
|
+
"bigquery": "service-account",
|
|
213
|
+
"google-analytics": "service-account",
|
|
214
|
+
"google-calendar": "service-account",
|
|
215
|
+
"aws-athena": "service-account",
|
|
216
|
+
"redshift": "service-account",
|
|
217
|
+
// api-key
|
|
218
|
+
"databricks": "api-key",
|
|
219
|
+
"dbt": "api-key",
|
|
220
|
+
"airtable": "api-key",
|
|
221
|
+
"openai": "api-key",
|
|
222
|
+
"gemini": "api-key",
|
|
223
|
+
"anthropic": "api-key",
|
|
224
|
+
"wix-store": "api-key"
|
|
225
|
+
};
|
|
226
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
227
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
228
|
+
return slug;
|
|
203
229
|
}
|
|
204
230
|
};
|
|
205
231
|
|
|
@@ -282,7 +282,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
282
282
|
return result;
|
|
283
283
|
}
|
|
284
284
|
static deriveKey(slug, authType) {
|
|
285
|
-
|
|
285
|
+
if (authType) return `${slug}-${authType}`;
|
|
286
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
287
|
+
// user-password
|
|
288
|
+
"postgresql": "user-password",
|
|
289
|
+
"mysql": "user-password",
|
|
290
|
+
"clickhouse": "user-password",
|
|
291
|
+
"kintone": "user-password",
|
|
292
|
+
"squadbase-db": "user-password",
|
|
293
|
+
// service-account
|
|
294
|
+
"snowflake": "service-account",
|
|
295
|
+
"bigquery": "service-account",
|
|
296
|
+
"google-analytics": "service-account",
|
|
297
|
+
"google-calendar": "service-account",
|
|
298
|
+
"aws-athena": "service-account",
|
|
299
|
+
"redshift": "service-account",
|
|
300
|
+
// api-key
|
|
301
|
+
"databricks": "api-key",
|
|
302
|
+
"dbt": "api-key",
|
|
303
|
+
"airtable": "api-key",
|
|
304
|
+
"openai": "api-key",
|
|
305
|
+
"gemini": "api-key",
|
|
306
|
+
"anthropic": "api-key",
|
|
307
|
+
"wix-store": "api-key"
|
|
308
|
+
};
|
|
309
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
310
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
311
|
+
return slug;
|
|
286
312
|
}
|
|
287
313
|
};
|
|
288
314
|
|
package/dist/connectors/dbt.js
CHANGED
|
@@ -424,7 +424,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
424
424
|
return result;
|
|
425
425
|
}
|
|
426
426
|
static deriveKey(slug, authType) {
|
|
427
|
-
|
|
427
|
+
if (authType) return `${slug}-${authType}`;
|
|
428
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
429
|
+
// user-password
|
|
430
|
+
"postgresql": "user-password",
|
|
431
|
+
"mysql": "user-password",
|
|
432
|
+
"clickhouse": "user-password",
|
|
433
|
+
"kintone": "user-password",
|
|
434
|
+
"squadbase-db": "user-password",
|
|
435
|
+
// service-account
|
|
436
|
+
"snowflake": "service-account",
|
|
437
|
+
"bigquery": "service-account",
|
|
438
|
+
"google-analytics": "service-account",
|
|
439
|
+
"google-calendar": "service-account",
|
|
440
|
+
"aws-athena": "service-account",
|
|
441
|
+
"redshift": "service-account",
|
|
442
|
+
// api-key
|
|
443
|
+
"databricks": "api-key",
|
|
444
|
+
"dbt": "api-key",
|
|
445
|
+
"airtable": "api-key",
|
|
446
|
+
"openai": "api-key",
|
|
447
|
+
"gemini": "api-key",
|
|
448
|
+
"anthropic": "api-key",
|
|
449
|
+
"wix-store": "api-key"
|
|
450
|
+
};
|
|
451
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
452
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
453
|
+
return slug;
|
|
428
454
|
}
|
|
429
455
|
};
|
|
430
456
|
|
package/dist/connectors/gamma.js
CHANGED
|
@@ -258,7 +258,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
258
258
|
return result;
|
|
259
259
|
}
|
|
260
260
|
static deriveKey(slug, authType) {
|
|
261
|
-
|
|
261
|
+
if (authType) return `${slug}-${authType}`;
|
|
262
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
263
|
+
// user-password
|
|
264
|
+
"postgresql": "user-password",
|
|
265
|
+
"mysql": "user-password",
|
|
266
|
+
"clickhouse": "user-password",
|
|
267
|
+
"kintone": "user-password",
|
|
268
|
+
"squadbase-db": "user-password",
|
|
269
|
+
// service-account
|
|
270
|
+
"snowflake": "service-account",
|
|
271
|
+
"bigquery": "service-account",
|
|
272
|
+
"google-analytics": "service-account",
|
|
273
|
+
"google-calendar": "service-account",
|
|
274
|
+
"aws-athena": "service-account",
|
|
275
|
+
"redshift": "service-account",
|
|
276
|
+
// api-key
|
|
277
|
+
"databricks": "api-key",
|
|
278
|
+
"dbt": "api-key",
|
|
279
|
+
"airtable": "api-key",
|
|
280
|
+
"openai": "api-key",
|
|
281
|
+
"gemini": "api-key",
|
|
282
|
+
"anthropic": "api-key",
|
|
283
|
+
"wix-store": "api-key"
|
|
284
|
+
};
|
|
285
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
286
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
287
|
+
return slug;
|
|
262
288
|
}
|
|
263
289
|
};
|
|
264
290
|
|
|
@@ -131,7 +131,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
131
131
|
return result;
|
|
132
132
|
}
|
|
133
133
|
static deriveKey(slug, authType) {
|
|
134
|
-
|
|
134
|
+
if (authType) return `${slug}-${authType}`;
|
|
135
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
136
|
+
// user-password
|
|
137
|
+
"postgresql": "user-password",
|
|
138
|
+
"mysql": "user-password",
|
|
139
|
+
"clickhouse": "user-password",
|
|
140
|
+
"kintone": "user-password",
|
|
141
|
+
"squadbase-db": "user-password",
|
|
142
|
+
// service-account
|
|
143
|
+
"snowflake": "service-account",
|
|
144
|
+
"bigquery": "service-account",
|
|
145
|
+
"google-analytics": "service-account",
|
|
146
|
+
"google-calendar": "service-account",
|
|
147
|
+
"aws-athena": "service-account",
|
|
148
|
+
"redshift": "service-account",
|
|
149
|
+
// api-key
|
|
150
|
+
"databricks": "api-key",
|
|
151
|
+
"dbt": "api-key",
|
|
152
|
+
"airtable": "api-key",
|
|
153
|
+
"openai": "api-key",
|
|
154
|
+
"gemini": "api-key",
|
|
155
|
+
"anthropic": "api-key",
|
|
156
|
+
"wix-store": "api-key"
|
|
157
|
+
};
|
|
158
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
159
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
160
|
+
return slug;
|
|
135
161
|
}
|
|
136
162
|
};
|
|
137
163
|
|
|
@@ -213,7 +213,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
213
213
|
return result;
|
|
214
214
|
}
|
|
215
215
|
static deriveKey(slug, authType) {
|
|
216
|
-
|
|
216
|
+
if (authType) return `${slug}-${authType}`;
|
|
217
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
218
|
+
// user-password
|
|
219
|
+
"postgresql": "user-password",
|
|
220
|
+
"mysql": "user-password",
|
|
221
|
+
"clickhouse": "user-password",
|
|
222
|
+
"kintone": "user-password",
|
|
223
|
+
"squadbase-db": "user-password",
|
|
224
|
+
// service-account
|
|
225
|
+
"snowflake": "service-account",
|
|
226
|
+
"bigquery": "service-account",
|
|
227
|
+
"google-analytics": "service-account",
|
|
228
|
+
"google-calendar": "service-account",
|
|
229
|
+
"aws-athena": "service-account",
|
|
230
|
+
"redshift": "service-account",
|
|
231
|
+
// api-key
|
|
232
|
+
"databricks": "api-key",
|
|
233
|
+
"dbt": "api-key",
|
|
234
|
+
"airtable": "api-key",
|
|
235
|
+
"openai": "api-key",
|
|
236
|
+
"gemini": "api-key",
|
|
237
|
+
"anthropic": "api-key",
|
|
238
|
+
"wix-store": "api-key"
|
|
239
|
+
};
|
|
240
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
241
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
242
|
+
return slug;
|
|
217
243
|
}
|
|
218
244
|
};
|
|
219
245
|
|
|
@@ -456,7 +482,17 @@ var gmailOauthConnector = new ConnectorPlugin({
|
|
|
456
482
|
|
|
457
483
|
### Business Logic
|
|
458
484
|
|
|
459
|
-
The business logic type for this connector is "typescript". Write handler code using the connector SDK shown below. Do NOT access credentials directly from environment variables.
|
|
485
|
+
The business logic type for this connector is "typescript". Write handler code using the connector SDK shown below. Do NOT access credentials directly from environment variables and do NOT read \`INTERNAL_SQUADBASE_*\` env vars \u2014 the SDK takes care of OAuth.
|
|
486
|
+
|
|
487
|
+
SDK surface (client created via \`connection(connectionId)\`):
|
|
488
|
+
- \`client.request(path, init?)\` \u2014 low-level authenticated fetch (\`path\` is appended to \`https://gmail.googleapis.com/gmail/v1/users\`).
|
|
489
|
+
- \`client.getProfile()\` \u2014 fetch the authenticated user's profile.
|
|
490
|
+
- \`client.listLabels()\` \u2014 list all labels.
|
|
491
|
+
- \`client.listMessages(options?)\` \u2014 list messages with optional \`q\`, \`maxResults\`, \`labelIds\`, \`pageToken\`.
|
|
492
|
+
- \`client.getMessage(id, format?)\` \u2014 fetch a specific message (format: \`full\` / \`metadata\` / \`minimal\` / \`raw\`).
|
|
493
|
+
- \`client.listThreads(options?)\` / \`client.getThread(id)\` \u2014 thread operations.
|
|
494
|
+
|
|
495
|
+
If a handler test fails with \`Connection proxy is not configured\`, retry \u2014 the sandbox is still initializing. Do NOT abandon the SDK and construct OAuth proxy URLs manually.
|
|
460
496
|
|
|
461
497
|
#### Example
|
|
462
498
|
|
|
@@ -529,7 +565,17 @@ thread.messages.forEach(m => console.log(m.snippet));
|
|
|
529
565
|
|
|
530
566
|
### Business Logic
|
|
531
567
|
|
|
532
|
-
\u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306E\u30D3\u30B8\u30CD\u30B9\u30ED\u30B8\u30C3\u30AF\u30BF\u30A4\u30D7\u306F "typescript" \u3067\u3059\u3002\u4EE5\u4E0B\u306B\u793A\u3059\u30B3\u30CD\u30AF\
|
|
568
|
+
\u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306E\u30D3\u30B8\u30CD\u30B9\u30ED\u30B8\u30C3\u30AF\u30BF\u30A4\u30D7\u306F "typescript" \u3067\u3059\u3002\u4EE5\u4E0B\u306B\u793A\u3059\u30B3\u30CD\u30AF\u30BF SDK \u3092\u4F7F\u7528\u3057\u3066\u30CF\u30F3\u30C9\u30E9\u30B3\u30FC\u30C9\u3092\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u74B0\u5883\u5909\u6570\u304B\u3089\u76F4\u63A5\u8A8D\u8A3C\u60C5\u5831\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\`INTERNAL_SQUADBASE_*\` \u306E\u74B0\u5883\u5909\u6570\u3092\u4F7F\u3063\u3066\u624B\u52D5\u3067 OAuth \u30D7\u30ED\u30AD\u30B7\u3092\u53E9\u304F\u3053\u3068\u3082\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044 \u2014 SDK \u304C OAuth \u3092\u51E6\u7406\u3057\u307E\u3059\u3002
|
|
569
|
+
|
|
570
|
+
SDK\uFF08\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\uFF09:
|
|
571
|
+
- \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304D fetch\uFF08\`path\` \u306F \`https://gmail.googleapis.com/gmail/v1/users\` \u306B\u8FFD\u52A0\u3055\u308C\u307E\u3059\uFF09\u3002
|
|
572
|
+
- \`client.getProfile()\` \u2014 \u8A8D\u8A3C\u30E6\u30FC\u30B6\u30FC\u306E\u30D7\u30ED\u30D5\u30A3\u30FC\u30EB\u3092\u53D6\u5F97\u3002
|
|
573
|
+
- \`client.listLabels()\` \u2014 \u5168\u30E9\u30D9\u30EB\u3092\u4E00\u89A7\u3002
|
|
574
|
+
- \`client.listMessages(options?)\` \u2014 \u30E1\u30C3\u30BB\u30FC\u30B8\u4E00\u89A7\uFF08\`q\`, \`maxResults\`, \`labelIds\`, \`pageToken\` \u30AA\u30D7\u30B7\u30E7\u30F3\u5BFE\u5FDC\uFF09\u3002
|
|
575
|
+
- \`client.getMessage(id, format?)\` \u2014 \u7279\u5B9A\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u53D6\u5F97\uFF08format: \`full\` / \`metadata\` / \`minimal\` / \`raw\`\uFF09\u3002
|
|
576
|
+
- \`client.listThreads(options?)\` / \`client.getThread(id)\` \u2014 \u30B9\u30EC\u30C3\u30C9\u64CD\u4F5C\u3002
|
|
577
|
+
|
|
578
|
+
\u30CF\u30F3\u30C9\u30E9\u306E\u30C6\u30B9\u30C8\u304C \`Connection proxy is not configured\` \u3067\u5931\u6557\u3059\u308B\u5834\u5408\u306F\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u901A\u5E38\u306F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306E\u521D\u671F\u5316\u4E2D\u306B\u8D77\u304D\u307E\u3059\u3002SDK \u3092\u8AE6\u3081\u3066 OAuth \u30D7\u30ED\u30AD\u30B7\u306E URL \u3092\u81EA\u5206\u3067\u7D44\u307F\u7ACB\u3066\u308B\u3053\u3068\u306F **\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044**\u3002
|
|
533
579
|
|
|
534
580
|
#### Example
|
|
535
581
|
|
package/dist/connectors/gmail.js
CHANGED
|
@@ -371,7 +371,33 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
371
371
|
return result;
|
|
372
372
|
}
|
|
373
373
|
static deriveKey(slug, authType) {
|
|
374
|
-
|
|
374
|
+
if (authType) return `${slug}-${authType}`;
|
|
375
|
+
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
376
|
+
// user-password
|
|
377
|
+
"postgresql": "user-password",
|
|
378
|
+
"mysql": "user-password",
|
|
379
|
+
"clickhouse": "user-password",
|
|
380
|
+
"kintone": "user-password",
|
|
381
|
+
"squadbase-db": "user-password",
|
|
382
|
+
// service-account
|
|
383
|
+
"snowflake": "service-account",
|
|
384
|
+
"bigquery": "service-account",
|
|
385
|
+
"google-analytics": "service-account",
|
|
386
|
+
"google-calendar": "service-account",
|
|
387
|
+
"aws-athena": "service-account",
|
|
388
|
+
"redshift": "service-account",
|
|
389
|
+
// api-key
|
|
390
|
+
"databricks": "api-key",
|
|
391
|
+
"dbt": "api-key",
|
|
392
|
+
"airtable": "api-key",
|
|
393
|
+
"openai": "api-key",
|
|
394
|
+
"gemini": "api-key",
|
|
395
|
+
"anthropic": "api-key",
|
|
396
|
+
"wix-store": "api-key"
|
|
397
|
+
};
|
|
398
|
+
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
399
|
+
if (fallbackAuthType) return `${slug}-${fallbackAuthType}`;
|
|
400
|
+
return slug;
|
|
375
401
|
}
|
|
376
402
|
};
|
|
377
403
|
|
|
@@ -485,7 +511,7 @@ All paths are relative to https://gmail.googleapis.com/gmail/v1/users. Use '/me'
|
|
|
485
511
|
});
|
|
486
512
|
|
|
487
513
|
// ../connectors/src/connectors/gmail/setup.ts
|
|
488
|
-
var requestToolName = `
|
|
514
|
+
var requestToolName = `gmail-service-account_${requestTool.name}`;
|
|
489
515
|
var gmailOnboarding = new ConnectorOnboarding({
|
|
490
516
|
connectionSetupInstructions: {
|
|
491
517
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Gmail\uFF08\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\uFF09\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u63A5\u7D9A\u4F5C\u6210\u6642\u306B\u306F\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8JSON\u306E\u307F\u304C\u8A2D\u5B9A\u6E08\u307F\u3067\u3001\u59D4\u4EFB\u5BFE\u8C61\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306F\u3053\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u4E2D\u306B\u53D6\u5F97\u3057\u307E\u3059\u3002
|
|
@@ -544,12 +570,12 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
544
570
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
545
571
|
},
|
|
546
572
|
dataOverviewInstructions: {
|
|
547
|
-
en: `1. Call
|
|
548
|
-
2. Call
|
|
549
|
-
3. Call
|
|
550
|
-
ja: `1.
|
|
551
|
-
2.
|
|
552
|
-
3. \u5404\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3064\u3044\u3066
|
|
573
|
+
en: `1. Call gmail-service-account_request with GET /me/labels to list all labels
|
|
574
|
+
2. Call gmail-service-account_request with GET /me/messages?maxResults=5 to get recent message IDs
|
|
575
|
+
3. Call gmail-service-account_request with GET /me/messages/{id}?format=metadata for each message to see subjects and senders`,
|
|
576
|
+
ja: `1. gmail-service-account_request \u3067 GET /me/labels \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30E9\u30D9\u30EB\u4E00\u89A7\u3092\u53D6\u5F97
|
|
577
|
+
2. gmail-service-account_request \u3067 GET /me/messages?maxResults=5 \u3092\u547C\u3073\u51FA\u3057\u3001\u6700\u65B0\u30E1\u30C3\u30BB\u30FC\u30B8ID\u3092\u53D6\u5F97
|
|
578
|
+
3. \u5404\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3064\u3044\u3066 gmail-service-account_request \u3067 GET /me/messages/{id}?format=metadata \u3092\u547C\u3073\u51FA\u3057\u3001\u4EF6\u540D\u3068\u9001\u4FE1\u8005\u3092\u78BA\u8A8D`
|
|
553
579
|
}
|
|
554
580
|
});
|
|
555
581
|
|
|
@@ -567,7 +593,7 @@ var gmailConnector = new ConnectorPlugin({
|
|
|
567
593
|
systemPrompt: {
|
|
568
594
|
en: `### Tools
|
|
569
595
|
|
|
570
|
-
- \`
|
|
596
|
+
- \`gmail-service-account_request\`: The only way to call the Gmail API (read-only). Use it to list messages, get message details, list labels, list threads, and get user profile. Authentication is handled automatically using a service account with domain-wide delegation.
|
|
571
597
|
|
|
572
598
|
### Gmail API Reference
|
|
573
599
|
|
|
@@ -640,7 +666,7 @@ thread.messages.forEach(m => console.log(m.snippet));
|
|
|
640
666
|
\`\`\``,
|
|
641
667
|
ja: `### \u30C4\u30FC\u30EB
|
|
642
668
|
|
|
643
|
-
- \`
|
|
669
|
+
- \`gmail-service-account_request\`: Gmail API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09\u3002\u30E1\u30C3\u30BB\u30FC\u30B8\u4E00\u89A7\u306E\u53D6\u5F97\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u8A73\u7D30\u306E\u53D6\u5F97\u3001\u30E9\u30D9\u30EB\u4E00\u89A7\u3001\u30B9\u30EC\u30C3\u30C9\u4E00\u89A7\u3001\u30E6\u30FC\u30B6\u30FC\u30D7\u30ED\u30D5\u30A3\u30FC\u30EB\u306E\u53D6\u5F97\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30C9\u30E1\u30A4\u30F3\u5168\u4F53\u306E\u59D4\u4EFB\u3092\u4F7F\u7528\u3057\u3066\u8A8D\u8A3C\u306F\u81EA\u52D5\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002
|
|
644
670
|
|
|
645
671
|
### Gmail API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
646
672
|
|