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

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
@@ -133,6 +133,43 @@ interface AirtableConnectorSdk {
133
133
  */
134
134
  declare function createClient$6(params: Record<string, string>): AirtableConnectorSdk;
135
135
 
136
+ interface GoogleAdsRow {
137
+ [key: string]: unknown;
138
+ }
139
+ interface GoogleAdsConnectorSdk {
140
+ /**
141
+ * Send an authenticated request to the Google Ads API v18.
142
+ *
143
+ * The placeholder `{customerId}` in the path is auto-replaced with the configured customer ID.
144
+ *
145
+ * @param path - API path (e.g., "customers/{customerId}/googleAds:searchStream")
146
+ * @param init - Standard RequestInit (same as fetch)
147
+ * @returns Standard Response (same as fetch)
148
+ */
149
+ request(path: string, init?: RequestInit): Promise<Response>;
150
+ /**
151
+ * Execute a GAQL (Google Ads Query Language) query using searchStream.
152
+ *
153
+ * @param query - GAQL query string
154
+ * @param customerId - Override the default customer ID
155
+ * @returns Array of result rows
156
+ *
157
+ * @see https://developers.google.com/google-ads/api/docs/query/overview
158
+ */
159
+ search(query: string, customerId?: string): Promise<GoogleAdsRow[]>;
160
+ /**
161
+ * List accessible customer accounts.
162
+ */
163
+ listAccessibleCustomers(): Promise<string[]>;
164
+ }
165
+ /**
166
+ * Create a Google Ads client from resolved connection parameters.
167
+ *
168
+ * @param params - Resolved parameter values keyed by parameter slug
169
+ * @param fetchFn - Optional fetch function (for OAuth proxy injection)
170
+ */
171
+ declare function createClient$5(params: Record<string, string>, fetchFn?: typeof fetch): GoogleAdsConnectorSdk;
172
+
136
173
  interface GoogleAnalyticsConnectorSdk {
137
174
  /**
138
175
  * Send an authenticated request to the Google Analytics Data API.
@@ -237,7 +274,181 @@ interface GoogleAnalyticsConnectorSdk {
237
274
  * @param params - Resolved parameter values keyed by parameter slug
238
275
  * ("service-account-key-json-base64", "property-id")
239
276
  */
240
- declare function createClient$5(params: Record<string, string>): GoogleAnalyticsConnectorSdk;
277
+ declare function createClient$4(params: Record<string, string>): GoogleAnalyticsConnectorSdk;
278
+
279
+ interface GoogleAnalyticsOauthConnectorSdk {
280
+ /**
281
+ * Send an authenticated request to the Google Analytics Data API v1beta.
282
+ *
283
+ * Occurrences of `{propertyId}` in the path are auto-replaced with the configured property ID.
284
+ *
285
+ * @param path - API path (e.g., "properties/{propertyId}:runReport")
286
+ * @param init - Standard RequestInit (same as fetch)
287
+ * @returns Standard Response (same as fetch)
288
+ */
289
+ request(path: string, init?: RequestInit): Promise<Response>;
290
+ /**
291
+ * Run a GA4 report.
292
+ *
293
+ * @see https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport
294
+ */
295
+ runReport(request: {
296
+ dateRanges: {
297
+ startDate: string;
298
+ endDate: string;
299
+ }[];
300
+ dimensions?: {
301
+ name: string;
302
+ }[];
303
+ metrics: {
304
+ name: string;
305
+ }[];
306
+ limit?: number;
307
+ offset?: number;
308
+ dimensionFilter?: Record<string, unknown>;
309
+ metricFilter?: Record<string, unknown>;
310
+ orderBys?: Record<string, unknown>[];
311
+ }): Promise<{
312
+ rows: {
313
+ dimensionValues: {
314
+ value: string;
315
+ }[];
316
+ metricValues: {
317
+ value: string;
318
+ }[];
319
+ }[];
320
+ rowCount: number;
321
+ }>;
322
+ /**
323
+ * Get available dimensions and metrics for a property.
324
+ *
325
+ * @see https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata
326
+ */
327
+ getMetadata(): Promise<{
328
+ name: string;
329
+ dimensions: {
330
+ apiName: string;
331
+ uiName: string;
332
+ description: string;
333
+ [key: string]: unknown;
334
+ }[];
335
+ metrics: {
336
+ apiName: string;
337
+ uiName: string;
338
+ description: string;
339
+ type: string;
340
+ [key: string]: unknown;
341
+ }[];
342
+ }>;
343
+ /**
344
+ * Run a realtime report.
345
+ *
346
+ * @see https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runRealtimeReport
347
+ */
348
+ runRealtimeReport(request: {
349
+ dimensions?: {
350
+ name: string;
351
+ }[];
352
+ metrics: {
353
+ name: string;
354
+ }[];
355
+ limit?: number;
356
+ dimensionFilter?: Record<string, unknown>;
357
+ metricFilter?: Record<string, unknown>;
358
+ minuteRanges?: {
359
+ startMinutesAgo?: number;
360
+ endMinutesAgo?: number;
361
+ name?: string;
362
+ }[];
363
+ }): Promise<{
364
+ rows: {
365
+ dimensionValues: {
366
+ value: string;
367
+ }[];
368
+ metricValues: {
369
+ value: string;
370
+ }[];
371
+ }[];
372
+ rowCount: number;
373
+ }>;
374
+ }
375
+ /**
376
+ * Create a Google Analytics client from resolved connection parameters.
377
+ *
378
+ * @param params - Resolved parameter values keyed by parameter slug
379
+ * @param fetchFn - Optional fetch function (for OAuth proxy injection)
380
+ */
381
+ declare function createClient$3(params: Record<string, string>, fetchFn?: typeof fetch): GoogleAnalyticsOauthConnectorSdk;
382
+
383
+ interface SpreadsheetProperties {
384
+ title: string;
385
+ locale?: string;
386
+ timeZone?: string;
387
+ }
388
+ interface SheetProperties {
389
+ sheetId: number;
390
+ title: string;
391
+ index: number;
392
+ sheetType?: string;
393
+ gridProperties?: {
394
+ rowCount: number;
395
+ columnCount: number;
396
+ };
397
+ }
398
+ interface SpreadsheetMetadata {
399
+ spreadsheetId: string;
400
+ properties: SpreadsheetProperties;
401
+ sheets: {
402
+ properties: SheetProperties;
403
+ }[];
404
+ }
405
+ interface ValueRange {
406
+ range: string;
407
+ majorDimension: string;
408
+ values: unknown[][];
409
+ }
410
+ interface BatchValueRange {
411
+ spreadsheetId: string;
412
+ valueRanges: ValueRange[];
413
+ }
414
+ interface GoogleSheetsConnectorSdk {
415
+ /**
416
+ * Send an authenticated request to the Google Sheets API v4.
417
+ *
418
+ * The placeholder `{spreadsheetId}` in the path is automatically replaced
419
+ * with the configured default Spreadsheet ID.
420
+ *
421
+ * @param path - API path (e.g., "/{spreadsheetId}/values/Sheet1!A1:D10")
422
+ * @param init - Standard RequestInit (same as fetch)
423
+ * @returns Standard Response (same as fetch)
424
+ */
425
+ request(path: string, init?: RequestInit): Promise<Response>;
426
+ /**
427
+ * Get spreadsheet metadata including sheet names and properties.
428
+ */
429
+ getSpreadsheet(spreadsheetId?: string): Promise<SpreadsheetMetadata>;
430
+ /**
431
+ * Get cell values for a given range (A1 notation).
432
+ *
433
+ * @param range - A1 notation range (e.g., "Sheet1!A1:D10")
434
+ * @param spreadsheetId - Override the default spreadsheet ID
435
+ */
436
+ getValues(range: string, spreadsheetId?: string): Promise<ValueRange>;
437
+ /**
438
+ * Get cell values for multiple ranges in one request.
439
+ *
440
+ * @param ranges - Array of A1 notation ranges
441
+ * @param spreadsheetId - Override the default spreadsheet ID
442
+ */
443
+ batchGetValues(ranges: string[], spreadsheetId?: string): Promise<BatchValueRange>;
444
+ }
445
+ /**
446
+ * Create a Google Sheets client from resolved connection parameters.
447
+ *
448
+ * @param params - Resolved parameter values keyed by parameter slug
449
+ * @param fetchFn - Optional fetch function (for OAuth proxy injection)
450
+ */
451
+ declare function createClient$2(params: Record<string, string>, fetchFn?: typeof fetch): GoogleSheetsConnectorSdk;
241
452
 
242
453
  interface WixStoreConnectorSdk {
243
454
  /**
@@ -328,7 +539,7 @@ interface WixStoreConnectorSdk {
328
539
  * @param params - Resolved parameter values keyed by parameter slug
329
540
  * ("account-id", "site-id", "api-key")
330
541
  */
331
- declare function createClient$4(params: Record<string, string>): WixStoreConnectorSdk;
542
+ declare function createClient$1(params: Record<string, string>): WixStoreConnectorSdk;
332
543
 
333
544
  interface DbtConnectorSdk {
334
545
  /**
@@ -384,217 +595,6 @@ interface DbtConnectorSdk {
384
595
  * @param params - Resolved parameter values keyed by parameter slug
385
596
  * ("host", "account-id", "prod-env-id", "token")
386
597
  */
387
- declare function createClient$3(params: Record<string, string>): DbtConnectorSdk;
388
-
389
- interface SpreadsheetProperties {
390
- title: string;
391
- locale?: string;
392
- timeZone?: string;
393
- }
394
- interface SheetProperties {
395
- sheetId: number;
396
- title: string;
397
- index: number;
398
- sheetType?: string;
399
- gridProperties?: {
400
- rowCount: number;
401
- columnCount: number;
402
- };
403
- }
404
- interface SpreadsheetMetadata {
405
- spreadsheetId: string;
406
- properties: SpreadsheetProperties;
407
- sheets: {
408
- properties: SheetProperties;
409
- }[];
410
- }
411
- interface ValueRange {
412
- range: string;
413
- majorDimension: string;
414
- values: unknown[][];
415
- }
416
- interface BatchValueRange {
417
- spreadsheetId: string;
418
- valueRanges: ValueRange[];
419
- }
420
- interface GoogleSheetsConnectorSdk {
421
- /**
422
- * Send an authenticated request to the Google Sheets API v4.
423
- *
424
- * The placeholder `{spreadsheetId}` in the path is automatically replaced
425
- * with the configured default Spreadsheet ID.
426
- *
427
- * @param path - API path (e.g., "/{spreadsheetId}/values/Sheet1!A1:D10")
428
- * @param init - Standard RequestInit (same as fetch)
429
- * @returns Standard Response (same as fetch)
430
- */
431
- request(path: string, init?: RequestInit): Promise<Response>;
432
- /**
433
- * Get spreadsheet metadata including sheet names and properties.
434
- */
435
- getSpreadsheet(spreadsheetId?: string): Promise<SpreadsheetMetadata>;
436
- /**
437
- * Get cell values for a given range (A1 notation).
438
- *
439
- * @param range - A1 notation range (e.g., "Sheet1!A1:D10")
440
- * @param spreadsheetId - Override the default spreadsheet ID
441
- */
442
- getValues(range: string, spreadsheetId?: string): Promise<ValueRange>;
443
- /**
444
- * Get cell values for multiple ranges in one request.
445
- *
446
- * @param ranges - Array of A1 notation ranges
447
- * @param spreadsheetId - Override the default spreadsheet ID
448
- */
449
- batchGetValues(ranges: string[], spreadsheetId?: string): Promise<BatchValueRange>;
450
- }
451
- /**
452
- * Create a Google Sheets client from resolved connection parameters.
453
- *
454
- * @param params - Resolved parameter values keyed by parameter slug
455
- * @param fetchFn - Optional fetch function (for OAuth proxy injection)
456
- */
457
- declare function createClient$2(params: Record<string, string>, fetchFn?: typeof fetch): GoogleSheetsConnectorSdk;
458
-
459
- interface GoogleAnalyticsOauthConnectorSdk {
460
- /**
461
- * Send an authenticated request to the Google Analytics Data API v1beta.
462
- *
463
- * Occurrences of `{propertyId}` in the path are auto-replaced with the configured property ID.
464
- *
465
- * @param path - API path (e.g., "properties/{propertyId}:runReport")
466
- * @param init - Standard RequestInit (same as fetch)
467
- * @returns Standard Response (same as fetch)
468
- */
469
- request(path: string, init?: RequestInit): Promise<Response>;
470
- /**
471
- * Run a GA4 report.
472
- *
473
- * @see https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport
474
- */
475
- runReport(request: {
476
- dateRanges: {
477
- startDate: string;
478
- endDate: string;
479
- }[];
480
- dimensions?: {
481
- name: string;
482
- }[];
483
- metrics: {
484
- name: string;
485
- }[];
486
- limit?: number;
487
- offset?: number;
488
- dimensionFilter?: Record<string, unknown>;
489
- metricFilter?: Record<string, unknown>;
490
- orderBys?: Record<string, unknown>[];
491
- }): Promise<{
492
- rows: {
493
- dimensionValues: {
494
- value: string;
495
- }[];
496
- metricValues: {
497
- value: string;
498
- }[];
499
- }[];
500
- rowCount: number;
501
- }>;
502
- /**
503
- * Get available dimensions and metrics for a property.
504
- *
505
- * @see https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata
506
- */
507
- getMetadata(): Promise<{
508
- name: string;
509
- dimensions: {
510
- apiName: string;
511
- uiName: string;
512
- description: string;
513
- [key: string]: unknown;
514
- }[];
515
- metrics: {
516
- apiName: string;
517
- uiName: string;
518
- description: string;
519
- type: string;
520
- [key: string]: unknown;
521
- }[];
522
- }>;
523
- /**
524
- * Run a realtime report.
525
- *
526
- * @see https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runRealtimeReport
527
- */
528
- runRealtimeReport(request: {
529
- dimensions?: {
530
- name: string;
531
- }[];
532
- metrics: {
533
- name: string;
534
- }[];
535
- limit?: number;
536
- dimensionFilter?: Record<string, unknown>;
537
- metricFilter?: Record<string, unknown>;
538
- minuteRanges?: {
539
- startMinutesAgo?: number;
540
- endMinutesAgo?: number;
541
- name?: string;
542
- }[];
543
- }): Promise<{
544
- rows: {
545
- dimensionValues: {
546
- value: string;
547
- }[];
548
- metricValues: {
549
- value: string;
550
- }[];
551
- }[];
552
- rowCount: number;
553
- }>;
554
- }
555
- /**
556
- * Create a Google Analytics client from resolved connection parameters.
557
- *
558
- * @param params - Resolved parameter values keyed by parameter slug
559
- * @param fetchFn - Optional fetch function (for OAuth proxy injection)
560
- */
561
- declare function createClient$1(params: Record<string, string>, fetchFn?: typeof fetch): GoogleAnalyticsOauthConnectorSdk;
562
-
563
- interface GoogleAdsRow {
564
- [key: string]: unknown;
565
- }
566
- interface GoogleAdsConnectorSdk {
567
- /**
568
- * Send an authenticated request to the Google Ads API v18.
569
- *
570
- * The placeholder `{customerId}` in the path is auto-replaced with the configured customer ID.
571
- *
572
- * @param path - API path (e.g., "customers/{customerId}/googleAds:searchStream")
573
- * @param init - Standard RequestInit (same as fetch)
574
- * @returns Standard Response (same as fetch)
575
- */
576
- request(path: string, init?: RequestInit): Promise<Response>;
577
- /**
578
- * Execute a GAQL (Google Ads Query Language) query using searchStream.
579
- *
580
- * @param query - GAQL query string
581
- * @param customerId - Override the default customer ID
582
- * @returns Array of result rows
583
- *
584
- * @see https://developers.google.com/google-ads/api/docs/query/overview
585
- */
586
- search(query: string, customerId?: string): Promise<GoogleAdsRow[]>;
587
- /**
588
- * List accessible customer accounts.
589
- */
590
- listAccessibleCustomers(): Promise<string[]>;
591
- }
592
- /**
593
- * Create a Google Ads client from resolved connection parameters.
594
- *
595
- * @param params - Resolved parameter values keyed by parameter slug
596
- * @param fetchFn - Optional fetch function (for OAuth proxy injection)
597
- */
598
- declare function createClient(params: Record<string, string>, fetchFn?: typeof fetch): GoogleAdsConnectorSdk;
598
+ declare function createClient(params: Record<string, string>): DbtConnectorSdk;
599
599
 
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$3 as dbt, createClient as googleAds, createClient$5 as googleAnalytics, createClient$1 as googleAnalyticsOauth, createClient$2 as googleSheets, createClient$8 as kintone, createClient$7 as openai, createClient$4 as wixStore };
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 };