@cfxlabsinc/b2b-services
    Preparing search index...
    interface ApiUsagePlanArgs {
        apis: LambdaRestApi[];
        slug: string;
    }
    Index

    Every REST API the plan meters — the whole surface a customer buys when they are granted slug.

    A list, not a single API, because a service is sometimes split across several REST APIs: a custom-domain base-path mapping binds one API, so serving v1/redemption and v1/ledger-accounts off one Lambda takes two. When this took a single api, the sibling silently kept apiKeyRequired: true with no plan behind it, and every key issued through the API-access dashboard got a 403 INVALID_API_KEY on it — undetectable from the grant grid, which shows the stage as granted.

    Rule: every API whose methods set apiKeyRequired belongs in exactly one plan's apis. An API in none is unreachable by any dashboard-issued key.

    slug: string

    Short product slug — swap, identity, withdraw. Becomes the plan name (<slug>-<stack>), its description, and the apiStage tag.

    Deliberately NOT derived from the component name or the base path: it does not always match either. withdrawal-api meters as withdraw, and that name is the join key for usage reporting, so deriving it would silently rename a plan and split its metering history.