import type { GameModelAPI } from '../domains/gameModel.js'; import type { Scalars } from '../generated/graphql.js'; import type { KitInvokePolicy } from './blueprints/index.js'; /** * Runtime **monetization** helpers — the app feature/tier surface in shop * terms. Features are string keys (`'vip'`, `'land_owner'`, `'battle_pass'`) * defined per app and granted to **access tiers** (the management-side * `appAccess` tiers players buy/hold); any model function whose policy * carries a `tier_feature` leaf then admits only players on a granted tier. * * Gate blueprint functions by composing {@link gate} (=`featureGate`) into a * builder's `*policyExtra` option, e.g. * `plotBlueprint({ buyPolicyExtra: kit.features.gate('land_owner') })`. * * All methods require the app-admin `manage_apps` permission. * * Obtained via `client.kit(appId).features`. */ export declare class FeaturesKit { private readonly appId; private readonly gameModel; constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI); /** Define (or re-describe) a feature key for the app. */ define(featureKey: string, description?: string): Promise<{ __typename?: "GmAppFeature"; appId: string; featureKey: string; description: string | null; }>; /** List the app's defined feature keys. */ list(): Promise<{ __typename?: "GmAppFeature"; appId: string; featureKey: string; description: string | null; }[]>; /** Grant a feature to an access tier (its holders pass `tier_feature` checks). */ grantToTier(tierId: Scalars['BigInt']['input'], featureKey: string): Promise<{ __typename?: "GmTierFeature"; appId: string; tierId: string; featureKey: string; }>; /** Revoke a feature from an access tier. */ revokeFromTier(tierId: Scalars['BigInt']['input'], featureKey: string): Promise; /** List tier→feature grants (optionally for one tier). */ tierFeatures(tierId?: Scalars['BigInt']['input']): Promise<{ __typename?: "GmTierFeature"; appId: string; tierId: string; featureKey: string; }[]>; /** * A `tier_feature` policy leaf for `feature` — pass it to any blueprint * builder's `*policyExtra` option to monetization-gate that function. * (Also exported standalone as `featureGate`.) */ gate(feature: string): KitInvokePolicy; } //# sourceMappingURL=features.d.ts.map