@aforoai/metering 1.0.0 → 1.1.2
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/README.md +37 -9
- package/dist/cjs/buffer.d.ts +7 -1
- package/dist/cjs/buffer.d.ts.map +1 -1
- package/dist/cjs/buffer.js +11 -3
- package/dist/cjs/buffer.js.map +1 -1
- package/dist/cjs/client.d.ts +27 -11
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +212 -55
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/idempotency.d.ts +9 -9
- package/dist/cjs/idempotency.js +9 -9
- package/dist/cjs/index.d.ts +8 -8
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +20 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/limits.d.ts +47 -7
- package/dist/cjs/limits.d.ts.map +1 -1
- package/dist/cjs/limits.js +65 -10
- package/dist/cjs/limits.js.map +1 -1
- package/dist/cjs/middleware/common.d.ts +8 -2
- package/dist/cjs/middleware/common.d.ts.map +1 -1
- package/dist/cjs/middleware/common.js +12 -4
- package/dist/cjs/middleware/common.js.map +1 -1
- package/dist/cjs/middleware/express.d.ts +1 -1
- package/dist/cjs/middleware/express.d.ts.map +1 -1
- package/dist/cjs/middleware/express.js +8 -8
- package/dist/cjs/middleware/express.js.map +1 -1
- package/dist/cjs/middleware/fastify.d.ts +1 -1
- package/dist/cjs/middleware/fastify.d.ts.map +1 -1
- package/dist/cjs/middleware/fastify.js +8 -8
- package/dist/cjs/middleware/fastify.js.map +1 -1
- package/dist/cjs/middleware/koa.d.ts +1 -1
- package/dist/cjs/middleware/koa.d.ts.map +1 -1
- package/dist/cjs/middleware/koa.js +8 -8
- package/dist/cjs/middleware/koa.js.map +1 -1
- package/dist/cjs/transport.d.ts +4 -2
- package/dist/cjs/transport.d.ts.map +1 -1
- package/dist/cjs/transport.js +75 -5
- package/dist/cjs/transport.js.map +1 -1
- package/dist/cjs/types.d.ts +53 -1
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/buffer.js +11 -3
- package/dist/esm/buffer.js.map +1 -1
- package/dist/esm/client.js +209 -52
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/idempotency.js +9 -9
- package/dist/esm/index.js +7 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/limits.js +62 -10
- package/dist/esm/limits.js.map +1 -1
- package/dist/esm/middleware/common.js +11 -4
- package/dist/esm/middleware/common.js.map +1 -1
- package/dist/esm/middleware/express.js +3 -3
- package/dist/esm/middleware/express.js.map +1 -1
- package/dist/esm/middleware/fastify.js +3 -3
- package/dist/esm/middleware/fastify.js.map +1 -1
- package/dist/esm/middleware/koa.js +3 -3
- package/dist/esm/middleware/koa.js.map +1 -1
- package/dist/esm/package.json +1 -0
- package/dist/esm/transport.js +75 -5
- package/dist/esm/transport.js.map +1 -1
- package/dist/types/buffer.d.ts +7 -1
- package/dist/types/buffer.d.ts.map +1 -1
- package/dist/types/client.d.ts +27 -11
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/idempotency.d.ts +9 -9
- package/dist/types/index.d.ts +8 -8
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/limits.d.ts +47 -7
- package/dist/types/limits.d.ts.map +1 -1
- package/dist/types/middleware/common.d.ts +8 -2
- package/dist/types/middleware/common.d.ts.map +1 -1
- package/dist/types/middleware/express.d.ts +1 -1
- package/dist/types/middleware/express.d.ts.map +1 -1
- package/dist/types/middleware/fastify.d.ts +1 -1
- package/dist/types/middleware/fastify.d.ts.map +1 -1
- package/dist/types/middleware/koa.d.ts +1 -1
- package/dist/types/middleware/koa.d.ts.map +1 -1
- package/dist/types/transport.d.ts +4 -2
- package/dist/types/transport.d.ts.map +1 -1
- package/dist/types/types.d.ts +53 -1
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +22 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koa.d.ts","sourceRoot":"","sources":["../../../src/middleware/koa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"koa.d.ts","sourceRoot":"","sources":["../../../src/middleware/koa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKhD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,iBAAiB,IAUR,KAAK,GAAG,EAAE,MAAM,GAAG,mBAuDlE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResolvedEvent, FlushResult } from './types';
|
|
1
|
+
import { ResolvedEvent, FlushResult } from './types.js';
|
|
2
2
|
export interface TransportOptions {
|
|
3
3
|
baseUrl: string;
|
|
4
4
|
apiKey: string;
|
|
@@ -12,7 +12,9 @@ export interface TransportOptions {
|
|
|
12
12
|
* - POST /v1/ingest/batch with X-API-Key: {apiKey} (never Authorization: Bearer -- the ingestor parses Bearer as a JWT and rejects the request 401)
|
|
13
13
|
* - Retry on 5xx, 408, 429 with exponential backoff
|
|
14
14
|
* - Respects Retry-After header on 429
|
|
15
|
-
* - No retry on 4xx (bad input)
|
|
15
|
+
* - No retry on 4xx (bad input); the server's error message is surfaced
|
|
16
|
+
* - A 2xx whose body reports per-event failures (`errors[]`) is a partial
|
|
17
|
+
* failure: those events are reported back as rejected
|
|
16
18
|
* - AbortController timeout per request
|
|
17
19
|
*/
|
|
18
20
|
export declare class Transport {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,OAAO,EAAE,gBAAgB;IAQrC,kEAAkE;IAC5D,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAoFzD;;;;;;;;OAQG;IACG,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IAsBlE,OAAO,CAAC,KAAK;CAGd"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why a buffered event was permanently dropped by the SDK.
|
|
3
|
+
* - 'overflow': the ring buffer was full — the OLDEST event was evicted to make room.
|
|
4
|
+
* - 'retry_exhausted': a batch failed after all transport retries (ingest outage).
|
|
5
|
+
* - 'rejected': the ingestor rejected the batch with a non-retryable 4xx, or
|
|
6
|
+
* rejected this event individually in a partially accepted batch.
|
|
7
|
+
* - 'invalid': the event failed a client-side check at track() (blank
|
|
8
|
+
* customerId/metricName, quantity <= 0, a field over the ingestor's size
|
|
9
|
+
* limit, a malformed occurredAt) and was never buffered or sent.
|
|
10
|
+
*/
|
|
11
|
+
export type DropReason = 'overflow' | 'retry_exhausted' | 'rejected' | 'invalid';
|
|
1
12
|
/** Options for creating an AforoClient instance. */
|
|
2
13
|
export interface AforoOptions {
|
|
3
14
|
/** Aforo API key for authentication. */
|
|
@@ -26,6 +37,17 @@ export interface AforoOptions {
|
|
|
26
37
|
timeout?: number;
|
|
27
38
|
/** Graceful shutdown timeout in milliseconds. Default: 5000 */
|
|
28
39
|
shutdownTimeoutMs?: number;
|
|
40
|
+
/**
|
|
41
|
+
* OPT-IN hook invoked with events the SDK is about to lose permanently
|
|
42
|
+
* (buffer overflow, retry exhaustion, non-retryable rejection, or an event
|
|
43
|
+
* that failed client-side validation — reason 'invalid'), so the
|
|
44
|
+
* app can persist / alert / replay them. Dropped events keep their
|
|
45
|
+
* idempotency keys — re-submitting them via track() after recovery is
|
|
46
|
+
* dedup-safe. Default: none (drops are still counted in droppedCount and
|
|
47
|
+
* WARN-logged). Exceptions thrown by the hook are swallowed — a hook bug
|
|
48
|
+
* can never break flushing.
|
|
49
|
+
*/
|
|
50
|
+
onDrop?: (events: ResolvedEvent[], reason: DropReason) => void;
|
|
29
51
|
}
|
|
30
52
|
/** A usage event to track. */
|
|
31
53
|
export interface TrackEvent {
|
|
@@ -40,12 +62,27 @@ export interface TrackEvent {
|
|
|
40
62
|
* default. Trimmed, uppercased and sent as top-level `productType`.
|
|
41
63
|
*/
|
|
42
64
|
productType?: string;
|
|
43
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Optional idempotency key — supply a STABLE value to dedup retries of the
|
|
67
|
+
* same logical event. Omitted = dedup opt-out: the SDK stamps a unique
|
|
68
|
+
* random key per track() call (still stable across the SDK's own flush
|
|
69
|
+
* retries of the buffered event).
|
|
70
|
+
*/
|
|
44
71
|
idempotencyKey?: string;
|
|
45
72
|
/** When the event occurred. Defaults to now. ISO 8601 string or epoch ms. */
|
|
46
73
|
occurredAt?: string | number;
|
|
47
74
|
/** Arbitrary key-value metadata attached to the event. */
|
|
48
75
|
metadata?: Record<string, string | number | boolean>;
|
|
76
|
+
/**
|
|
77
|
+
* Optional outcome of the request (used by OUTCOME_BASED pricing, which bills
|
|
78
|
+
* each event at the weight set for its status). Events without a status bill
|
|
79
|
+
* at full price. Trimmed and upper-cased by the SDK; blank is treated as absent.
|
|
80
|
+
* Accepted values: SUCCESS, PARTIAL, TIMEOUT, ERROR, VALIDATION_FAILED, FAILED,
|
|
81
|
+
* FAILURE, CANCELLED, PENDING, BLOCKED, HITL_REQUIRED (max 20 chars). Any other
|
|
82
|
+
* value is logged with a warning and omitted (the event is still sent, without
|
|
83
|
+
* a status), because the server would reject the event.
|
|
84
|
+
*/
|
|
85
|
+
executionStatus?: string;
|
|
49
86
|
/** Optional HTTP context, sent as top-level fields. */
|
|
50
87
|
endpointPath?: string;
|
|
51
88
|
httpMethod?: string;
|
|
@@ -61,6 +98,8 @@ export interface ResolvedEvent {
|
|
|
61
98
|
occurredAt: string;
|
|
62
99
|
productType: string;
|
|
63
100
|
metadata?: Record<string, string | number | boolean>;
|
|
101
|
+
/** Normalized (trimmed, upper-cased) execution status; omitted when not set. */
|
|
102
|
+
executionStatus?: string;
|
|
64
103
|
endpointPath?: string;
|
|
65
104
|
httpMethod?: string;
|
|
66
105
|
statusCode?: number;
|
|
@@ -124,5 +163,18 @@ export interface MiddlewareOptions {
|
|
|
124
163
|
export interface FlushResult {
|
|
125
164
|
sent: number;
|
|
126
165
|
failed: number;
|
|
166
|
+
/** Why the batch failed, when failed > 0. Absent on success. */
|
|
167
|
+
reason?: DropReason;
|
|
168
|
+
/**
|
|
169
|
+
* Events the ingestor rejected individually inside a batch it otherwise
|
|
170
|
+
* accepted (per-event `errors[]` in the response). `index` is the position
|
|
171
|
+
* in the sent batch. Present only when the response identified them.
|
|
172
|
+
*/
|
|
173
|
+
rejected?: Array<{
|
|
174
|
+
index: number;
|
|
175
|
+
message: string;
|
|
176
|
+
}>;
|
|
177
|
+
/** Server-provided explanation for a failed batch, when one was returned. */
|
|
178
|
+
message?: string;
|
|
127
179
|
}
|
|
128
180
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"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AA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IAE7E,4DAA4D;IAC5D,aAAa,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;CAC1D;AAED,0CAA0C;AAC1C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrD,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aforoai/metering",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Aforo usage metering SDK — track API usage events with batching, retry, and framework middleware",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "npm run build:cjs && npm run build:esm && npm run build:types",
|
|
39
39
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
40
|
-
"build:esm": "tsc -p tsconfig.esm.json",
|
|
40
|
+
"build:esm": "tsc -p tsconfig.esm.json && node -e \"require('fs').writeFileSync('dist/esm/package.json', JSON.stringify({ type: 'module' }) + '\\n')\"",
|
|
41
41
|
"build:types": "tsc -p tsconfig.types.json",
|
|
42
42
|
"test": "jest --coverage",
|
|
43
43
|
"lint": "tsc --noEmit",
|
|
@@ -56,11 +56,27 @@
|
|
|
56
56
|
"fastify": ">=4.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
|
-
"@types/express": {
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
"@types/express": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"@types/koa": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"fastify": {
|
|
66
|
+
"optional": true
|
|
67
|
+
}
|
|
62
68
|
},
|
|
63
|
-
"keywords": [
|
|
69
|
+
"keywords": [
|
|
70
|
+
"aforo",
|
|
71
|
+
"metering",
|
|
72
|
+
"usage",
|
|
73
|
+
"billing",
|
|
74
|
+
"api",
|
|
75
|
+
"middleware",
|
|
76
|
+
"express",
|
|
77
|
+
"fastify",
|
|
78
|
+
"koa"
|
|
79
|
+
],
|
|
64
80
|
"license": "Apache-2.0",
|
|
65
81
|
"repository": {
|
|
66
82
|
"type": "git",
|