@agentronics/sdk 0.7.0 → 0.7.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/{chunk-3WPDIMJP.js → chunk-4FLZQPCO.js} +5 -5
- package/dist/chunk-4FLZQPCO.js.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.global.js +4 -4
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/init-only.cjs +4 -4
- package/dist/init-only.cjs.map +1 -1
- package/dist/init-only.global.js +4 -4
- package/dist/init-only.global.js.map +1 -1
- package/dist/init-only.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3WPDIMJP.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -42,8 +42,25 @@ interface GatewayExporterOptions {
|
|
|
42
42
|
gatewayUrl: string;
|
|
43
43
|
publishableKey: string;
|
|
44
44
|
fetcher?: typeof fetch;
|
|
45
|
+
/** Send queued events this often (ms). Default 2000. */
|
|
46
|
+
flushMs?: number;
|
|
47
|
+
/** Events per request; the API accepts at most 100. Default 50. */
|
|
48
|
+
maxBatch?: number;
|
|
49
|
+
/** Events kept while the API is unreachable; the oldest are dropped first. Default 500. */
|
|
50
|
+
maxQueue?: number;
|
|
45
51
|
}
|
|
46
|
-
|
|
52
|
+
interface GatewayExporter extends TraceExporter {
|
|
53
|
+
/** Send everything queued now (`keepalive` lets it outlive the page); settles when the requests do. */
|
|
54
|
+
flush(keepalive?: boolean): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Sends traces to the Agentronics API from the browser. Events are queued and
|
|
58
|
+
* sent in batches — every couple of seconds, when a batch fills, and when the
|
|
59
|
+
* page is hidden or closed — rather than one request per event, so a busy page
|
|
60
|
+
* stays within the API's per-visitor rate limit. Never throws into the page:
|
|
61
|
+
* a failed send drops that batch.
|
|
62
|
+
*/
|
|
63
|
+
declare const createGatewayExporter: ({ gatewayUrl, publishableKey, fetcher, flushMs, maxBatch, maxQueue, }: GatewayExporterOptions) => GatewayExporter;
|
|
47
64
|
|
|
48
65
|
interface WebhookExporterOptions {
|
|
49
66
|
url: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -42,8 +42,25 @@ interface GatewayExporterOptions {
|
|
|
42
42
|
gatewayUrl: string;
|
|
43
43
|
publishableKey: string;
|
|
44
44
|
fetcher?: typeof fetch;
|
|
45
|
+
/** Send queued events this often (ms). Default 2000. */
|
|
46
|
+
flushMs?: number;
|
|
47
|
+
/** Events per request; the API accepts at most 100. Default 50. */
|
|
48
|
+
maxBatch?: number;
|
|
49
|
+
/** Events kept while the API is unreachable; the oldest are dropped first. Default 500. */
|
|
50
|
+
maxQueue?: number;
|
|
45
51
|
}
|
|
46
|
-
|
|
52
|
+
interface GatewayExporter extends TraceExporter {
|
|
53
|
+
/** Send everything queued now (`keepalive` lets it outlive the page); settles when the requests do. */
|
|
54
|
+
flush(keepalive?: boolean): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Sends traces to the Agentronics API from the browser. Events are queued and
|
|
58
|
+
* sent in batches — every couple of seconds, when a batch fills, and when the
|
|
59
|
+
* page is hidden or closed — rather than one request per event, so a busy page
|
|
60
|
+
* stays within the API's per-visitor rate limit. Never throws into the page:
|
|
61
|
+
* a failed send drops that batch.
|
|
62
|
+
*/
|
|
63
|
+
declare const createGatewayExporter: ({ gatewayUrl, publishableKey, fetcher, flushMs, maxBatch, maxQueue, }: GatewayExporterOptions) => GatewayExporter;
|
|
47
64
|
|
|
48
65
|
interface WebhookExporterOptions {
|
|
49
66
|
url: string;
|