getRateCatalog (billing/rate-catalog.service.ts)

QuickVoice · apps/server/src/modules/billing/rate-catalog.service.ts · typescript · MIT
voice, Voice / Speech

Provides rate catalog parsing, AI usage cost calculations, and billing utilities for telephony and AI.

// Source: https://github.com/allgpt-co/QuickVoice | License: MIT | Copyright 2026 QuickVoice contributors
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from "zod";

import rawRateCatalog from "../../../data/billing-rates.json" with { type: "json" };
import {
  applyMarkup,
  assertNonNegativeMicros,
  ceilDiv,
} from "./money.js";

const microsString = z.string().regex(/^\d+$/, "must be an integer micro-dollar string");
const sourceUrl = z.string().url();

export const timedRateSchema = z.object({
  baseMicrosPerMinute: microsString,
  minimumSeconds: z.number().int().min(0).max(3600),
  incrementSeconds: z.number().int().min(1).max(3600),
});

export const telephonyRouteSchema = timedRateSchema.extend({
  provider: z.enum(["twilio", "telnyx"]),
  account: 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key