@openlimiter/core 0.1.0 → 0.2.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.
- package/dist/failures.d.ts +47 -0
- package/dist/failures.d.ts.map +1 -0
- package/dist/failures.js +76 -0
- package/dist/failures.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/normalizer.d.ts +21 -1
- package/dist/normalizer.d.ts.map +1 -1
- package/dist/normalizer.js +53 -2
- package/dist/normalizer.js.map +1 -1
- package/dist/types.d.ts +30 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ConnectorResult, ProviderCode } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Why a provider has nothing to show, in our own words.
|
|
4
|
+
*
|
|
5
|
+
* SECURITY. Not one character of a provider's own text ever reaches a human
|
|
6
|
+
* surface. A connector can hand back a payload full of anything at all, and the
|
|
7
|
+
* only thing that survives contact with this module is one of the four codes
|
|
8
|
+
* below, chosen by our code from what the connector and the normalizer can
|
|
9
|
+
* actually tell apart today. The sentences are constants written here, so a
|
|
10
|
+
* failure line on a card, in a window, or in a terminal is the same fixed
|
|
11
|
+
* string whatever the provider said.
|
|
12
|
+
*
|
|
13
|
+
* The four categories are exactly the four distinguishable outcomes:
|
|
14
|
+
*
|
|
15
|
+
* NOT_CONFIGURED the connector reported it has nothing set up
|
|
16
|
+
* SESSION_EXPIRED the connector reported its credential no longer works
|
|
17
|
+
* PAYLOAD_UNREADABLE the connector could not recognise what it was given
|
|
18
|
+
* VALIDATION_REJECTED the connector recognised it, the normalizer refused it
|
|
19
|
+
*
|
|
20
|
+
* Nothing finer is claimed, because nothing finer can be told apart without
|
|
21
|
+
* reading provider text, which is the one thing this module exists to prevent.
|
|
22
|
+
*/
|
|
23
|
+
export declare const FAILURE_CATEGORIES: readonly ["NOT_CONFIGURED", "SESSION_EXPIRED", "PAYLOAD_UNREADABLE", "VALIDATION_REJECTED"];
|
|
24
|
+
export type FailureCategory = (typeof FAILURE_CATEGORIES)[number];
|
|
25
|
+
/**
|
|
26
|
+
* The one sentence each category is ever shown as.
|
|
27
|
+
*
|
|
28
|
+
* Short enough to sit on one line of a card, plain enough to need no glossary,
|
|
29
|
+
* and fixed, so no surface can invent a variation of its own.
|
|
30
|
+
*/
|
|
31
|
+
export declare const failureSentence: Record<FailureCategory, string>;
|
|
32
|
+
/** A provider and the one reason it has nothing readable. */
|
|
33
|
+
export interface ProviderFailure {
|
|
34
|
+
provider: ProviderCode;
|
|
35
|
+
category: FailureCategory;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Map a connector's own refusal onto the shared vocabulary.
|
|
39
|
+
*
|
|
40
|
+
* The connector contract already narrows every refusal to three enum values, so
|
|
41
|
+
* this is a total function over a closed set and can never see a surprise.
|
|
42
|
+
*/
|
|
43
|
+
export declare function failureFromConnectorReason(reason: Extract<ConnectorResult, {
|
|
44
|
+
ok: false;
|
|
45
|
+
}>["reason"]): FailureCategory;
|
|
46
|
+
export declare function dedupeFailures(failures: readonly ProviderFailure[]): readonly ProviderFailure[];
|
|
47
|
+
//# sourceMappingURL=failures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failures.d.ts","sourceRoot":"","sources":["../src/failures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,6FAKrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAK3D,CAAC;AAEF,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,OAAO,CAAC,eAAe,EAAE;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,QAAQ,CAAC,GACxD,eAAe,CAIjB;AAgBD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,SAAS,eAAe,EAAE,GACnC,SAAS,eAAe,EAAE,CAS5B"}
|
package/dist/failures.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why a provider has nothing to show, in our own words.
|
|
3
|
+
*
|
|
4
|
+
* SECURITY. Not one character of a provider's own text ever reaches a human
|
|
5
|
+
* surface. A connector can hand back a payload full of anything at all, and the
|
|
6
|
+
* only thing that survives contact with this module is one of the four codes
|
|
7
|
+
* below, chosen by our code from what the connector and the normalizer can
|
|
8
|
+
* actually tell apart today. The sentences are constants written here, so a
|
|
9
|
+
* failure line on a card, in a window, or in a terminal is the same fixed
|
|
10
|
+
* string whatever the provider said.
|
|
11
|
+
*
|
|
12
|
+
* The four categories are exactly the four distinguishable outcomes:
|
|
13
|
+
*
|
|
14
|
+
* NOT_CONFIGURED the connector reported it has nothing set up
|
|
15
|
+
* SESSION_EXPIRED the connector reported its credential no longer works
|
|
16
|
+
* PAYLOAD_UNREADABLE the connector could not recognise what it was given
|
|
17
|
+
* VALIDATION_REJECTED the connector recognised it, the normalizer refused it
|
|
18
|
+
*
|
|
19
|
+
* Nothing finer is claimed, because nothing finer can be told apart without
|
|
20
|
+
* reading provider text, which is the one thing this module exists to prevent.
|
|
21
|
+
*/
|
|
22
|
+
export const FAILURE_CATEGORIES = [
|
|
23
|
+
"NOT_CONFIGURED",
|
|
24
|
+
"SESSION_EXPIRED",
|
|
25
|
+
"PAYLOAD_UNREADABLE",
|
|
26
|
+
"VALIDATION_REJECTED"
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* The one sentence each category is ever shown as.
|
|
30
|
+
*
|
|
31
|
+
* Short enough to sit on one line of a card, plain enough to need no glossary,
|
|
32
|
+
* and fixed, so no surface can invent a variation of its own.
|
|
33
|
+
*/
|
|
34
|
+
export const failureSentence = {
|
|
35
|
+
NOT_CONFIGURED: "Not set up yet, so nothing was read.",
|
|
36
|
+
SESSION_EXPIRED: "Session expired.",
|
|
37
|
+
PAYLOAD_UNREADABLE: "Payload could not be read, so nothing is claimed.",
|
|
38
|
+
VALIDATION_REJECTED: "Payload failed validation, kept the last good reading."
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Map a connector's own refusal onto the shared vocabulary.
|
|
42
|
+
*
|
|
43
|
+
* The connector contract already narrows every refusal to three enum values, so
|
|
44
|
+
* this is a total function over a closed set and can never see a surprise.
|
|
45
|
+
*/
|
|
46
|
+
export function failureFromConnectorReason(reason) {
|
|
47
|
+
if (reason === "not_configured")
|
|
48
|
+
return "NOT_CONFIGURED";
|
|
49
|
+
if (reason === "unavailable")
|
|
50
|
+
return "SESSION_EXPIRED";
|
|
51
|
+
return "PAYLOAD_UNREADABLE";
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Collapse a list of failures to one per provider, worst first.
|
|
55
|
+
*
|
|
56
|
+
* A provider can only ever show one line, so when two sources disagree the more
|
|
57
|
+
* specific answer wins: a reading that was rejected says more than a connector
|
|
58
|
+
* that never produced one.
|
|
59
|
+
*/
|
|
60
|
+
const severity = {
|
|
61
|
+
NOT_CONFIGURED: 0,
|
|
62
|
+
PAYLOAD_UNREADABLE: 1,
|
|
63
|
+
SESSION_EXPIRED: 2,
|
|
64
|
+
VALIDATION_REJECTED: 3
|
|
65
|
+
};
|
|
66
|
+
export function dedupeFailures(failures) {
|
|
67
|
+
const byProvider = new Map();
|
|
68
|
+
for (const failure of failures) {
|
|
69
|
+
const held = byProvider.get(failure.provider);
|
|
70
|
+
if (held === undefined || severity[failure.category] > severity[held.category]) {
|
|
71
|
+
byProvider.set(failure.provider, failure);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return [...byProvider.values()];
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=failures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failures.js","sourceRoot":"","sources":["../src/failures.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,gBAAgB;IAChB,iBAAiB;IACjB,oBAAoB;IACpB,qBAAqB;CACb,CAAC;AAIX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAoC;IAC9D,cAAc,EAAE,sCAAsC;IACtD,eAAe,EAAE,kBAAkB;IACnC,kBAAkB,EAAE,mDAAmD;IACvE,mBAAmB,EAAE,wDAAwD;CAC9E,CAAC;AAQF;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACxC,MAAyD;IAEzD,IAAI,MAAM,KAAK,gBAAgB;QAAE,OAAO,gBAAgB,CAAC;IACzD,IAAI,MAAM,KAAK,aAAa;QAAE,OAAO,iBAAiB,CAAC;IACvD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,QAAQ,GAAoC;IAChD,cAAc,EAAE,CAAC;IACjB,kBAAkB,EAAE,CAAC;IACrB,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,UAAU,cAAc,CAC5B,QAAoC;IAEpC,MAAM,UAAU,GAAG,IAAI,GAAG,EAAiC,CAAC;IAC5D,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAI,IAAI,KAAK,SAAS,IAAI,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/E,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/normalizer.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
import { type RawMeter, type Snapshot } from "./types.js";
|
|
1
|
+
import { type ProviderCode, type RawMeter, type Snapshot } from "./types.js";
|
|
2
2
|
export declare function normalizeMeter(raw: RawMeter): Snapshot | null;
|
|
3
3
|
export declare function normalizeMeters(rawMeters: readonly RawMeter[]): Snapshot[];
|
|
4
|
+
/**
|
|
5
|
+
* What survived validation, and who lost a reading to it.
|
|
6
|
+
*
|
|
7
|
+
* `normalizeMeters` above answers the only question the engine ever asks: what
|
|
8
|
+
* may be believed. A human surface has a second question, which is why a card
|
|
9
|
+
* is empty when a document clearly mentioned that provider, and this is the
|
|
10
|
+
* seam that answers it without changing the first.
|
|
11
|
+
*
|
|
12
|
+
* A rejected reading is only attributed when its provider code was itself
|
|
13
|
+
* valid. Anything else is counted and left anonymous rather than blamed on a
|
|
14
|
+
* provider that a hostile document happened to name.
|
|
15
|
+
*/
|
|
16
|
+
export interface NormalizeReport {
|
|
17
|
+
snapshots: Snapshot[];
|
|
18
|
+
/** Providers that had at least one reading refused. Never a guess. */
|
|
19
|
+
rejected: readonly ProviderCode[];
|
|
20
|
+
/** How many readings were dropped in total, attributable or not. */
|
|
21
|
+
dropped: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function normalizeMetersReport(rawMeters: readonly RawMeter[]): NormalizeReport;
|
|
4
24
|
export declare function canonicalJson(value: unknown): string;
|
|
5
25
|
//# sourceMappingURL=normalizer.d.ts.map
|
package/dist/normalizer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../src/normalizer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../src/normalizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,QAAQ,EAOd,MAAM,YAAY,CAAC;AAkGpB,wBAAgB,cAAc,CAAC,GAAG,EAAE,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAqC7D;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAK1E;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,sEAAsE;IACtE,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;IAClC,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,QAAQ,EAAE,GAC7B,eAAe,CAgBjB;AAUD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpD"}
|
package/dist/normalizer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PROVIDER_CODES } from "./types.js";
|
|
1
|
+
import { MAX_SNAPSHOT_AMOUNT, PROVIDER_CODES } from "./types.js";
|
|
2
2
|
const units = new Set(["PERCENT", "CREDITS", "TOKENS", "REQUESTS"]);
|
|
3
3
|
const sources = new Set([
|
|
4
4
|
"native_payload",
|
|
@@ -8,6 +8,7 @@ const sources = new Set([
|
|
|
8
8
|
"manual_entry"
|
|
9
9
|
]);
|
|
10
10
|
const precisions = new Set(["exact", "estimated", "manual"]);
|
|
11
|
+
const currencies = new Set(["USD"]);
|
|
11
12
|
const providerCodes = new Set(PROVIDER_CODES);
|
|
12
13
|
const safeMeter = /^[A-Z][A-Z0-9_]{0,31}$/u;
|
|
13
14
|
function isRecord(value) {
|
|
@@ -64,6 +65,37 @@ function normalizeLabels(value) {
|
|
|
64
65
|
verification: "UNVERIFIED"
|
|
65
66
|
};
|
|
66
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Validate the money amounts, as one unit or not at all.
|
|
70
|
+
*
|
|
71
|
+
* They arrive together or they do not arrive, and they leave together or they
|
|
72
|
+
* do not leave. Any one of them being absent, out of range, the wrong type, or
|
|
73
|
+
* inconsistent with the other drops all three, which is what keeps a card from
|
|
74
|
+
* ever printing a spend with no plan size beside it. The percentage on the same
|
|
75
|
+
* reading is untouched by this: a provider that misreports its money has not
|
|
76
|
+
* misreported how full the meter is.
|
|
77
|
+
*/
|
|
78
|
+
function normalizeAmounts(raw) {
|
|
79
|
+
const used = raw.usedAmount;
|
|
80
|
+
const limit = raw.limitAmount;
|
|
81
|
+
const currency = raw.currency;
|
|
82
|
+
if (used === undefined && limit === undefined && currency === undefined)
|
|
83
|
+
return null;
|
|
84
|
+
if (typeof used !== "number" || typeof limit !== "number")
|
|
85
|
+
return null;
|
|
86
|
+
if (typeof currency !== "string" || !currencies.has(currency)) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
if (!Number.isFinite(used) || !Number.isFinite(limit))
|
|
90
|
+
return null;
|
|
91
|
+
if (used < 0 || limit < 0)
|
|
92
|
+
return null;
|
|
93
|
+
if (used > limit)
|
|
94
|
+
return null;
|
|
95
|
+
if (used > MAX_SNAPSHOT_AMOUNT || limit > MAX_SNAPSHOT_AMOUNT)
|
|
96
|
+
return null;
|
|
97
|
+
return { usedAmount: used, limitAmount: limit, currency: currency };
|
|
98
|
+
}
|
|
67
99
|
export function normalizeMeter(raw) {
|
|
68
100
|
if (typeof raw.provider !== "string" || !providerCodes.has(raw.provider))
|
|
69
101
|
return null;
|
|
@@ -94,6 +126,7 @@ export function normalizeMeter(raw) {
|
|
|
94
126
|
return null;
|
|
95
127
|
if (Date.parse(raw.expiresAt) < Date.parse(raw.observedAt))
|
|
96
128
|
return null;
|
|
129
|
+
const amounts = normalizeAmounts(raw);
|
|
97
130
|
return {
|
|
98
131
|
provider: raw.provider,
|
|
99
132
|
meter: raw.meter,
|
|
@@ -105,7 +138,8 @@ export function normalizeMeter(raw) {
|
|
|
105
138
|
precision: raw.precision,
|
|
106
139
|
observedAt: raw.observedAt,
|
|
107
140
|
expiresAt: raw.expiresAt,
|
|
108
|
-
labels
|
|
141
|
+
labels,
|
|
142
|
+
...(amounts === null ? {} : amounts)
|
|
109
143
|
};
|
|
110
144
|
}
|
|
111
145
|
export function normalizeMeters(rawMeters) {
|
|
@@ -114,6 +148,23 @@ export function normalizeMeters(rawMeters) {
|
|
|
114
148
|
return normalized === null ? [] : [normalized];
|
|
115
149
|
});
|
|
116
150
|
}
|
|
151
|
+
export function normalizeMetersReport(rawMeters) {
|
|
152
|
+
const snapshots = [];
|
|
153
|
+
const rejected = new Set();
|
|
154
|
+
let dropped = 0;
|
|
155
|
+
for (const raw of rawMeters) {
|
|
156
|
+
const normalized = normalizeMeter(raw);
|
|
157
|
+
if (normalized !== null) {
|
|
158
|
+
snapshots.push(normalized);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
dropped += 1;
|
|
162
|
+
if (typeof raw.provider === "string" && providerCodes.has(raw.provider)) {
|
|
163
|
+
rejected.add(raw.provider);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return { snapshots, rejected: [...rejected], dropped };
|
|
167
|
+
}
|
|
117
168
|
function sortDeep(value) {
|
|
118
169
|
if (Array.isArray(value))
|
|
119
170
|
return value.map(sortDeep);
|
package/dist/normalizer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizer.js","sourceRoot":"","sources":["../src/normalizer.ts"],"names":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 -8,6 +8,29 @@ export interface SnapshotWindow {
|
|
|
8
8
|
kind: "rolling" | "fixed" | "lifetime" | "unknown";
|
|
9
9
|
durationSeconds?: number;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The one currency an amount may be stated in, for now.
|
|
13
|
+
*
|
|
14
|
+
* A literal rather than a string keeps a provider from writing its own text
|
|
15
|
+
* into a field a human reads. When a second currency is genuinely supported it
|
|
16
|
+
* is added here and the normalizer's set below grows with it.
|
|
17
|
+
*/
|
|
18
|
+
export type SnapshotCurrency = "USD";
|
|
19
|
+
/** Largest money amount a reading may carry. Above this it is not a plan. */
|
|
20
|
+
export declare const MAX_SNAPSHOT_AMOUNT = 1000000;
|
|
21
|
+
/**
|
|
22
|
+
* What a credit based plan has spent, and out of how much.
|
|
23
|
+
*
|
|
24
|
+
* Optional everywhere and travelling as one unit: a reading either carries all
|
|
25
|
+
* three of these or none of them, so a surface can never print a used figure
|
|
26
|
+
* with no limit beside it. A percentage never depends on them, which is why a
|
|
27
|
+
* pair that fails validation is dropped while the percentage survives.
|
|
28
|
+
*/
|
|
29
|
+
export interface SnapshotAmounts {
|
|
30
|
+
usedAmount: number;
|
|
31
|
+
limitAmount: number;
|
|
32
|
+
currency: SnapshotCurrency;
|
|
33
|
+
}
|
|
11
34
|
export interface ConnectorLabels {
|
|
12
35
|
credentialOrigin: "official-local-tool" | "user-key" | "browser-session" | "user-entered";
|
|
13
36
|
dataInterfaceStatus: "native-statusline-payload" | "documented-api" | "internal-endpoint" | "authenticated-scrape" | "manual";
|
|
@@ -26,6 +49,10 @@ export interface Snapshot {
|
|
|
26
49
|
observedAt: string;
|
|
27
50
|
expiresAt: string;
|
|
28
51
|
labels: ConnectorLabels;
|
|
52
|
+
/** Present only when the provider's own documented payload carried money. */
|
|
53
|
+
usedAmount?: number;
|
|
54
|
+
limitAmount?: number;
|
|
55
|
+
currency?: SnapshotCurrency;
|
|
29
56
|
}
|
|
30
57
|
export interface RawMeter {
|
|
31
58
|
provider: unknown;
|
|
@@ -39,6 +66,9 @@ export interface RawMeter {
|
|
|
39
66
|
observedAt: unknown;
|
|
40
67
|
expiresAt: unknown;
|
|
41
68
|
labels: unknown;
|
|
69
|
+
usedAmount?: unknown;
|
|
70
|
+
limitAmount?: unknown;
|
|
71
|
+
currency?: unknown;
|
|
42
72
|
}
|
|
43
73
|
export interface ConnectorReadContext {
|
|
44
74
|
payload?: unknown;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,iFAOjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,oBAAoB,GACpB,cAAc,CAAC;AAEnB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EACZ,qBAAqB,GACrB,UAAU,GACV,iBAAiB,GACjB,cAAc,CAAC;IACnB,mBAAmB,EACf,2BAA2B,GAC3B,gBAAgB,GAChB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,CAAC;IACb,cAAc,EAAE,KAAK,GAAG,MAAM,CAAC;IAC/B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,MAAM,WAA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KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,oBAAoB,CAAC;IACrC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IACrC,gBAAgB,EAAE,SAAS,YAAY,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,QAAQ;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC"}
|
package/dist/types.js
CHANGED
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,aAAa;IACb,UAAU;IACV,QAAQ;CACA,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,aAAa;IACb,UAAU;IACV,QAAQ;CACA,CAAC;AA2BX,6EAA6E;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC"}
|