@lightdash/common 3.305.1 → 3.306.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.
@@ -1,8 +1,7 @@
1
1
  import { ApiConnectorType } from '../../types/querySources';
2
2
  /**
3
3
  * How long a live data source's result answers the same query for everyone
4
- * on the source, before the next query calls the integration again. Set to
5
- * how fast each integration's data changes and how tight its quota is.
4
+ * on the source, before the next query calls the integration again.
6
5
  */
7
6
  export declare const LIVE_SOURCE_DEFAULT_CACHE_TTL_SECONDS: Record<ApiConnectorType, number>;
8
7
  /** 0 makes every query call the integration. */
@@ -1 +1 @@
1
- {"version":3,"file":"liveSourceCache.d.ts","sourceRoot":"","sources":["../../../../src/ee/externalConnections/liveSourceCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,EAAE,MAAM,CACtD,gBAAgB,EAChB,MAAM,CAkBT,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,iCAAiC,QAAe,CAAC;AAE9D,kFAAkF;AAClF,eAAO,MAAM,4BAA4B,cAC1B,gBAAgB,YACjB,MAAM,GAAG,IAAI,GAAG,SAAS,KACpC,MAAsE,CAAC;AAE1E,eAAO,MAAM,gCAAgC,UAAW,MAAM,KAAG,OAGnB,CAAC;AAE/C,8DAA8D;AAC9D,MAAM,MAAM,+BAA+B,GAAG;IAC1C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC"}
1
+ {"version":3,"file":"liveSourceCache.d.ts","sourceRoot":"","sources":["../../../../src/ee/externalConnections/liveSourceCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAK5D;;;GAGG;AACH,eAAO,MAAM,qCAAqC,EAAE,MAAM,CACtD,gBAAgB,EAChB,MAAM,CAYT,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,iCAAiC,QAAe,CAAC;AAE9D,kFAAkF;AAClF,eAAO,MAAM,4BAA4B,cAC1B,gBAAgB,YACjB,MAAM,GAAG,IAAI,GAAG,SAAS,KACpC,MAAsE,CAAC;AAE1E,eAAO,MAAM,gCAAgC,UAAW,MAAM,KAAG,OAGnB,CAAC;AAE/C,8DAA8D;AAC9D,MAAM,MAAM,+BAA+B,GAAG;IAC1C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC"}
@@ -1,26 +1,21 @@
1
1
  import { ApiConnectorType } from '../../types/querySources';
2
+ /** One hour for every integration until usage shows which need another window. */
3
+ const DEFAULT_CACHE_TTL_SECONDS = 60 * 60;
2
4
  /**
3
5
  * How long a live data source's result answers the same query for everyone
4
- * on the source, before the next query calls the integration again. Set to
5
- * how fast each integration's data changes and how tight its quota is.
6
+ * on the source, before the next query calls the integration again.
6
7
  */
7
8
  export const LIVE_SOURCE_DEFAULT_CACHE_TTL_SECONDS = {
8
- // Product analytics, read close to real time.
9
- [ApiConnectorType.POSTHOG]: 60,
10
- // Hourly processing and a token quota per property.
11
- [ApiConnectorType.GA4]: 600,
12
- // Data lands two to three days late.
13
- [ApiConnectorType.SEARCH_CONSOLE]: 3600,
14
- [ApiConnectorType.META_ADS]: 900,
15
- [ApiConnectorType.GOOGLE_ADS]: 900,
16
- [ApiConnectorType.LINKEDIN_ADS]: 900,
17
- // Channel reports update daily.
18
- [ApiConnectorType.YOUTUBE_ANALYTICS]: 3600,
19
- [ApiConnectorType.GITHUB]: 300,
20
- // Tickets change through the day; search allows about 120 calls a minute per workspace and a query can page several times.
21
- [ApiConnectorType.PYLON]: 300,
22
- // CRM records change through the day; queries with many filters or sorts use up its rate limit faster.
23
- [ApiConnectorType.ATTIO]: 300,
9
+ [ApiConnectorType.POSTHOG]: DEFAULT_CACHE_TTL_SECONDS,
10
+ [ApiConnectorType.GA4]: DEFAULT_CACHE_TTL_SECONDS,
11
+ [ApiConnectorType.SEARCH_CONSOLE]: DEFAULT_CACHE_TTL_SECONDS,
12
+ [ApiConnectorType.META_ADS]: DEFAULT_CACHE_TTL_SECONDS,
13
+ [ApiConnectorType.GOOGLE_ADS]: DEFAULT_CACHE_TTL_SECONDS,
14
+ [ApiConnectorType.LINKEDIN_ADS]: DEFAULT_CACHE_TTL_SECONDS,
15
+ [ApiConnectorType.YOUTUBE_ANALYTICS]: DEFAULT_CACHE_TTL_SECONDS,
16
+ [ApiConnectorType.GITHUB]: DEFAULT_CACHE_TTL_SECONDS,
17
+ [ApiConnectorType.PYLON]: DEFAULT_CACHE_TTL_SECONDS,
18
+ [ApiConnectorType.ATTIO]: DEFAULT_CACHE_TTL_SECONDS,
24
19
  };
25
20
  /** 0 makes every query call the integration. */
26
21
  export const LIVE_SOURCE_CACHE_TTL_MIN_SECONDS = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"liveSourceCache.js","sourceRoot":"","sources":["../../../../src/ee/externalConnections/liveSourceCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;;;GAIG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAG9C;IACA,8CAA8C;IAC9C,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAAE;IAC9B,oDAAoD;IACpD,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,GAAG;IAC3B,qCAAqC;IACrC,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE,IAAK;IACxC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,GAAG;IAChC,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,GAAG;IAClC,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,GAAG;IACpC,gCAAgC;IAChC,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,EAAE,IAAK;IAC3C,CAAC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