@stream-io/feeds-client 0.2.19 → 0.2.20

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 +1 @@
1
- {"version":3,"file":"throttled-get-batched-own-capabilities.d.ts","sourceRoot":"","sources":["../../../../src/utils/throttling/throttled-get-batched-own-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG;IACvD,KAAK,EAAE,MAAM,EAAE;IACf,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAC5C,iBAAiB,CAAC,0CAA0C,CAAC,CAAC;AAEhE,eAAO,MAAM,kDAAkD,OAAO,CAAC;AAIvE,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,WAAW,EACjB,EAAE,KAAK,EAAE,EAAE,yBAAyB,QAgBrC;AAED,wBAAgB,gBAAgB,SAE/B"}
1
+ {"version":3,"file":"throttled-get-batched-own-capabilities.d.ts","sourceRoot":"","sources":["../../../../src/utils/throttling/throttled-get-batched-own-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAIpD,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG;IACvD,KAAK,EAAE,MAAM,EAAE;IACf,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAC5C,iBAAiB,CAAC,0CAA0C,CAAC,CAAC;AAEhE,eAAO,MAAM,kDAAkD,OAAO,CAAC;AAIvE,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,WAAW,EACjB,EAAE,KAAK,EAAE,EAAE,yBAAyB,QAgBrC;AAED,wBAAgB,gBAAgB,SAE/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/feeds-client",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/es/index.mjs",
@@ -1,6 +1,8 @@
1
1
  import type { FeedsClient } from '@self';
2
2
  import type { ThrottledFunction } from './throttle';
3
3
 
4
+ const BATCH_OWN_CAPABILITIES_API_LIMIT = 100;
5
+
4
6
  export type GetBatchedOwnCapabilities = {
5
7
  feeds: string[];
6
8
  };
@@ -27,7 +29,7 @@ export function queueBatchedOwnCapabilities(
27
29
 
28
30
  if (queuedFeeds.size > 0) {
29
31
  this.throttledGetBatchOwnCapabilities(
30
- [...queuedFeeds],
32
+ [...queuedFeeds].slice(0, BATCH_OWN_CAPABILITIES_API_LIMIT),
31
33
  (feedsToClear: string[]) => {
32
34
  for (const feed of feedsToClear) {
33
35
  queuedFeeds.delete(feed);