feat: add billing and usage domain cores

This commit is contained in:
zn-admin committed 2026-08-13 16:27:55 +08:00
1 parent 48dd5d07c8
commit 5e60bb40e7
14 files changed
+931

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { readFile } from "node:fs/promises";
import { describe, expect, it } from "vitest";
describe("Go usage core compatibility fixture", () => {
it("freezes Shanghai boundaries, exclusions, dedupe, scope, and redaction", async () => {
const fixture = JSON.parse(await readFile("contracts/usage/core-v1.json", "utf8"));
expect(fixture).toEqual({
version: 1, timeZone: "Asia/Shanghai",
excluded: { sources: ["api"], providers: ["mock"] }, dedupeKey: "jobId",
scopes: { personal: "accountId", organization_admin: "organizationId", super_admin: "all" },
organizationAdminRedaction: ["accountUsername"]
});
});
});