import type { CatalogPackage } from '../types.js'; /** * Build the durable reference for a package, e.g. * `super-seru-promo@53gb@100000`, or `talkmania-roamax@10min@50000` when the * allowance is voice. Deterministic: the same package always produces the same ref. */ export declare function makePackageRef(pkg: { packageName: string; totalQuota: string; price: number; }): string; /** * Corpus identity for a package: `super-seru-promo@53gb`. * * Price is excluded on purpose — see the note at the top of this file. Two * prices for the same name and quota are the same offer at different times, and * an index must be able to tell that apart from a genuinely different offer. */ export declare function makeOfferId(pkg: { packageName: string; totalQuota: string; }): string; /** Remember one number's packages so a later call for that number can resolve the id it was shown. */ export declare function registerPackages(msisdn: string, packages: CatalogPackage[]): void; /** Resolve a package by an ephemeral id shown to this number earlier. */ export declare function findById(msisdn: string, id: string): CatalogPackage | undefined; /** Resolve a package by its durable ref, among this number's packages only. */ export declare function findByRef(msisdn: string, ref: string): CatalogPackage[]; /** Resolve every price variant remembered for one corpus identity, for this number. */ export declare function findByOfferId(msisdn: string, offerId: string): CatalogPackage[]; /** Find every package remembered for this number whose ref contains the fragment. */ export declare function searchRefs(msisdn: string, fragment: string): CatalogPackage[]; /** Size of one number's partition, or the sum across every number when none is named. */ export declare function packageStoreSize(msisdn?: string): { ids: number; refs: number; offerIds: number; }; /** Forget one number's packages, or every number's when none is named. */ export declare function clearPackageStore(msisdn?: string): void;