@idosgames/core 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -302,10 +302,20 @@ interface LootboxPresetBindings {
302
302
  PityRules?: PresetBinding | null;
303
303
  }
304
304
  type LootboxSupplyRule = { CatalogID?: null | string; ItemID?: null | string; MaxDrops?: null | number; [key: string]: unknown; };
305
- type LootboxDefinition = { LootboxID: string; AssetPaths?: null | Record<string, string>; PriceOptions?: null | Record<string, { PriceOptionID?: null | number; RequiredResources?: null | ResourceConsume; [key: string]: unknown; }>; RewardSlots?: null | Array<LootboxRewardSlot>; PityRules?: null | Array<LootboxPityRule>; Presets?: null | LootboxPresetBindings; RewardMultiplier?: null | RewardProgressionMultiplierSpec; SupplyLimits?: null | Array<LootboxSupplyRule>; [key: string]: unknown; };
305
+ type LootboxDefinition = { LootboxID: string; AssetPaths?: null | Record<string, string>; PriceOptions?: null | Record<string, { PriceOptionID?: null | number; RequiredResources?: null | ResourceConsume; [key: string]: unknown; }>; RewardSlots?: null | Array<LootboxRewardSlot>; PityRules?: null | Array<LootboxPityRule>; Presets?: null | LootboxPresetBindings; RewardMultiplier?: null | RewardProgressionMultiplierSpec; SupplyLimits?: null | Array<LootboxSupplyRule>; MaxOpenCount?: null | number; [key: string]: unknown; };
306
306
  /** The title's lootbox catalog (config), returned by getDefinitions(). */
307
+ /** Module-wide Lootbox settings shared by every lootbox of the title. */
308
+ interface LootboxGlobalSettings {
309
+ /**
310
+ * Max boxes per single open() call for every lootbox of the title. Overridden per lootbox via
311
+ * LootboxDefinition.MaxOpenCount. null = platform default (100). <= 0 = opening disabled.
312
+ */
313
+ MaxOpenCount?: number | null;
314
+ }
307
315
  interface LootboxDefinitions {
308
316
  Definitions?: Record<string, LootboxDefinition> | null;
317
+ /** Module-wide settings (e.g. the max-open ceiling). null = platform defaults apply. */
318
+ Settings?: LootboxGlobalSettings | null;
309
319
  RewardPools?: RewardPoolLibrary | null;
310
320
  }
311
321
  type LootboxDefinitionsResponse = { LootboxDefinitions?: null | LootboxDefinitions; };
@@ -394,7 +404,15 @@ declare const RewardAction: {
394
404
  };
395
405
  type RewardAction = (typeof RewardAction)[keyof typeof RewardAction];
396
406
  type ExperimentVariantCondition = { ExperimentID?: null | string; Variants?: null | Array<string>; [key: string]: unknown; };
397
- type SegmentGate = { Segments?: null | Array<string>; MinPremiumTier?: null | number; RequiredPremiumIDs?: null | Array<string>; MinLevel?: null | number; MaxLevel?: null | number; Countries?: null | Array<string>; RegisteredWithinDays?: null | number; ActiveWithinDays?: null | number; Experiment?: null | ExperimentVariantCondition; [key: string]: unknown; };
407
+ /** What a TutorialGateCondition checks about the player's onboarding progress. */
408
+ declare const TutorialGateMode: {
409
+ readonly Completed: "Completed";
410
+ readonly Started: "Started";
411
+ readonly StepReached: "StepReached";
412
+ };
413
+ type TutorialGateMode = (typeof TutorialGateMode)[keyof typeof TutorialGateMode];
414
+ type TutorialGateCondition = { FlowIDs?: null | Array<string>; Mode?: null | 'Completed' | 'Started' | 'StepReached'; StepID?: null | string; Negate?: null | boolean; SkippedCountsAsCompleted?: null | boolean; [key: string]: unknown; };
415
+ type SegmentGate = { Segments?: null | Array<string>; MinPremiumTier?: null | number; RequiredPremiumIDs?: null | Array<string>; MinLevel?: null | number; MaxLevel?: null | number; Countries?: null | Array<string>; RegisteredWithinDays?: null | number; ActiveWithinDays?: null | number; Experiment?: null | ExperimentVariantCondition; Tutorial?: null | TutorialGateCondition; [key: string]: unknown; };
398
416
  type RelativeWindow = { OffsetSecondsFromParentStart?: null | number; DurationSeconds?: null | number; AllowEarningAfterEnd?: null | boolean; ClaimGraceHours?: null | number; [key: string]: unknown; };
399
417
  type ScheduledWindow = { StartUtc?: null | string; EndUtc?: null | string; AllowEarningAfterEnd?: null | boolean; ClaimGraceHours?: null | number; [key: string]: unknown; };
400
418
  type ScheduleChain = { AnchorUtc?: null | string; MaxCycles?: null | number; PauseBetweenPhasesSec?: null | number; PauseBetweenCyclesSec?: null | number; [key: string]: unknown; };
@@ -530,6 +548,116 @@ declare const QuestAction: {
530
548
  readonly ClaimGroupCompletionReward: "ClaimGroupCompletionReward";
531
549
  };
532
550
  type QuestAction = (typeof QuestAction)[keyof typeof QuestAction];
551
+
552
+ declare const TutorialStepCompletionMode: {
553
+ /** The client calls completeStep itself ("the player tapped Next"). Default. */
554
+ readonly ClientAck: "ClientAck";
555
+ /** An engine game event closes it — the client only reports it was shown. */
556
+ readonly SystemEvent: "SystemEvent";
557
+ /** Closes on being shown (reportStepShown) — an informational aside. */
558
+ readonly Auto: "Auto";
559
+ /** Several triggers with an explicit all/any rule. */
560
+ readonly Composite: "Composite";
561
+ };
562
+ type TutorialStepCompletionMode = (typeof TutorialStepCompletionMode)[keyof typeof TutorialStepCompletionMode];
563
+ declare const TutorialRestartPolicy: {
564
+ readonly Never: "Never";
565
+ readonly OnRequest: "OnRequest";
566
+ readonly Always: "Always";
567
+ };
568
+ type TutorialRestartPolicy = (typeof TutorialRestartPolicy)[keyof typeof TutorialRestartPolicy];
569
+ declare const TutorialFlowStatus: {
570
+ readonly NotStarted: "NotStarted";
571
+ readonly InProgress: "InProgress";
572
+ readonly Completed: "Completed";
573
+ readonly Skipped: "Skipped";
574
+ /** Expired per Policy.ExpireAfterSeconds without being completed. */
575
+ readonly Expired: "Expired";
576
+ };
577
+ type TutorialFlowStatus = (typeof TutorialFlowStatus)[keyof typeof TutorialFlowStatus];
578
+ declare const TutorialScriptModule: {
579
+ readonly GameLoop: "GameLoop";
580
+ };
581
+ type TutorialScriptModule = (typeof TutorialScriptModule)[keyof typeof TutorialScriptModule];
582
+ declare const TutorialBoardAction: {
583
+ readonly Raid: "Raid";
584
+ readonly Attack: "Attack";
585
+ };
586
+ type TutorialBoardAction = (typeof TutorialBoardAction)[keyof typeof TutorialBoardAction];
587
+ type TutorialStepIdentity = { Title?: null | string; TitleKey?: null | string; Body?: null | string; BodyKey?: null | string; AnchorID?: null | string; HighlightTarget?: null | string; AssetPaths?: null | Record<string, string>; UiHint?: null | Record<string, string>; [key: string]: unknown; };
588
+ type TutorialStepCompletion = { Mode?: null | 'SystemEvent' | 'ClientAck' | 'Auto' | 'Composite'; Triggers?: null | Array<TriggerSource>; TargetValue?: null | number; RequireAllTriggers?: null | boolean; [key: string]: unknown; };
589
+ type TutorialStepEffects = { Grant?: null | ResourceGrant; UnlockFeatures?: null | Array<string>; [key: string]: unknown; };
590
+ type TutorialBoardScript = { TileType?: null | string; TileIndex?: null | number; ChanceOutcomeID?: null | string; RandomActionType?: null | 'Raid' | 'Attack'; [key: string]: unknown; };
591
+ type TutorialScriptedOutcome = { Module?: null | 'GameLoop'; Board?: null | TutorialBoardScript; MaxUses?: null | number; [key: string]: unknown; };
592
+ type TutorialStepPolicy = { Skippable?: null | boolean; TimeoutSeconds?: null | number; [key: string]: unknown; };
593
+ type TutorialStepDefinition = { StepID?: null | string; Order?: null | number; Identity?: null | TutorialStepIdentity; Completion?: null | TutorialStepCompletion; Effects?: null | TutorialStepEffects; Script?: null | TutorialScriptedOutcome; Policy?: null | TutorialStepPolicy; [key: string]: unknown; };
594
+ type TutorialIdentity = { DisplayName?: null | string; DisplayNameKey?: null | string; Description?: null | string; DescriptionKey?: null | string; SortOrder?: null | number; AssetPaths?: null | Record<string, string>; CustomParams?: null | Record<string, string>; [key: string]: unknown; };
595
+ type TutorialAvailability = { Schedule?: null | ScheduleSpec; Gate?: null | SegmentGate; RequiredFlowIDs?: null | Array<string>; AutoStart?: null | boolean; StartTrigger?: null | TriggerSource; [key: string]: unknown; };
596
+ type TutorialFlowPolicy = { Skippable?: null | boolean; SkippableFromOrder?: null | number; RestartPolicy?: null | 'Never' | 'OnRequest' | 'Always'; ExpireAfterSeconds?: null | number; IsBlocking?: null | boolean; UnlockFeatures?: null | Array<string>; [key: string]: unknown; };
597
+ type TutorialReward = { Grant?: null | ResourceGrant; AutoClaim?: null | boolean; [key: string]: unknown; };
598
+ type TutorialPresetBindings = { Availability?: null | PresetBinding; Policy?: null | PresetBinding; Reward?: null | PresetBinding; Steps?: null | PresetBinding; [key: string]: unknown; };
599
+ type TutorialFlowDefinition = { FlowID?: null | string; Identity?: null | TutorialIdentity; Availability?: null | TutorialAvailability; Policy?: null | TutorialFlowPolicy; Steps?: null | Record<string, TutorialStepDefinition>; Reward?: null | TutorialReward; Presets?: null | TutorialPresetBindings; [key: string]: unknown; };
600
+ type TutorialBlockingPolicy = { BlockingFlowIDs?: null | Array<string>; BlockedModules?: null | Array<string>; BlockedActions?: null | Record<string, Array<string>>; BlockBeforeStart?: null | boolean; SkipLiftsBlock?: null | boolean; [key: string]: unknown; };
601
+ type TutorialGlobalSettings = { IsEnabled?: null | boolean; MaxActiveFlows?: null | number; Blocking?: null | TutorialBlockingPolicy; [key: string]: unknown; };
602
+ type TutorialPresetRegistry = { Availability?: null | Record<string, TutorialAvailability>; Policy?: null | Record<string, TutorialFlowPolicy>; Reward?: null | Record<string, TutorialReward>; Steps?: null | Record<string, Record<string, TutorialStepDefinition>>; [key: string]: unknown; };
603
+ type TutorialDefinitions = { Flows?: null | Record<string, TutorialFlowDefinition>; Settings?: null | TutorialGlobalSettings; Presets?: null | TutorialPresetRegistry; [key: string]: unknown; };
604
+ interface UserTutorialStepState {
605
+ StepID?: string;
606
+ Progress?: number;
607
+ FiredTriggers?: number[];
608
+ ShownAtUtc?: string;
609
+ CompletedAtUtc?: string;
610
+ Skipped?: boolean;
611
+ ScriptUses?: number;
612
+ }
613
+ interface UserTutorialFlowState {
614
+ FlowID?: string;
615
+ Status?: TutorialFlowStatus;
616
+ CurrentStepID?: string | null;
617
+ StartedAtUtc?: string;
618
+ FinishedAtUtc?: string;
619
+ Steps?: Record<string, UserTutorialStepState>;
620
+ RestartCount?: number;
621
+ RewardClaimed?: boolean;
622
+ /**
623
+ * Experiment and variant captured when the flow STARTED. Not a duplicate of the live
624
+ * assignment: changing the experiment salt reassigns the player, and without the snapshot the
625
+ * funnel would attribute the run to a variant they never saw.
626
+ */
627
+ ExperimentID?: string | null;
628
+ VariantID?: string | null;
629
+ }
630
+ interface UserTutorialState {
631
+ Flows?: Record<string, UserTutorialFlowState>;
632
+ LastUpdatedUtc?: string;
633
+ }
634
+ type TutorialFlowView = { FlowID: string; Status: 'Completed' | 'Expired' | 'NotStarted' | 'InProgress' | 'Skipped'; TotalSteps: number; CompletedSteps: number; CanSkip: boolean; RewardClaimed: boolean; RewardPending: boolean; CurrentStepID?: null | string; CurrentStep?: null | TutorialStepDefinition; VariantID?: null | string; [key: string]: unknown; };
635
+ type GetUserTutorialStateResponse = { State?: null | UserTutorialState; Flows?: null | Array<TutorialFlowView>; UnlockedFeatures?: null | Array<string>; [key: string]: unknown; };
636
+ type TutorialFlowResponse = { Flow?: null | TutorialFlowView; [key: string]: unknown; };
637
+ type TutorialClaimResponse = { FlowID?: null | string; Granted?: null | ResourceOperation; [key: string]: unknown; };
638
+ type TutorialFlowBatchResponse = Array<{ Id: string; Success: boolean; Error?: null | string; Data?: null | TutorialFlowResponse; }>;
639
+ type TutorialStepProgress = { FlowID: string; StepID: string; Progress: number; Target: number; Completed: boolean; [key: string]: unknown; };
640
+ interface TutorialRequest extends BaseRequest {
641
+ FlowID?: string;
642
+ StepID?: string;
643
+ /** CompleteStepsBatch: steps to close, in order. Deduped by StepID. */
644
+ StepIDs?: string[];
645
+ /** Allow auto-start while reading state. Default true. */
646
+ AutoStart?: boolean;
647
+ }
648
+ declare const TutorialAction: {
649
+ readonly GetTutorialDefinitions: "GetTutorialDefinitions";
650
+ readonly GetUserTutorialState: "GetUserTutorialState";
651
+ readonly StartFlow: "StartFlow";
652
+ readonly ReportStepShown: "ReportStepShown";
653
+ readonly CompleteStep: "CompleteStep";
654
+ readonly CompleteStepsBatch: "CompleteStepsBatch";
655
+ readonly SkipStep: "SkipStep";
656
+ readonly SkipFlow: "SkipFlow";
657
+ readonly ClaimFlowReward: "ClaimFlowReward";
658
+ readonly ResetFlow: "ResetFlow";
659
+ };
660
+ type TutorialAction = (typeof TutorialAction)[keyof typeof TutorialAction];
533
661
  type ResourceEntry = { Type?: null | 'Item' | 'VirtualCurrency' | 'CryptoCurrency' | 'UsdCent'; CurrencyID?: null | string; Amount?: null | number; CatalogID?: null | string; ItemID?: null | string; };
534
662
  type EventTokenAddress = { EntityID: string; Type?: null | 'TimedEvent' | 'Quest' | 'Leaderboard' | 'CoopEvent' | 'Season'; };
535
663
  type EventTokenOperation = { Address?: null | EventTokenAddress; Amount?: null | number; Source?: null | string; };
@@ -704,6 +832,7 @@ type UserSeasonStateResponse = UserSeasonState;
704
832
  type ActiveSeasonInfo = { SeasonChainID: string; CycleIndex?: null | number; Season?: null | { SeasonID?: null | string; Order?: null | number; DurationSec?: null | number; DisplayName?: null | string; Description?: null | string; AssetPaths?: null | Record<string, string>; Tiers?: null | Array<{ Tier?: null | number; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; RequiredTokens?: null | number; TierReachedReward?: null | ResourceGrant; [key: string]: unknown; }>; LinkedCollectionID?: null | string; CustomParams?: null | Record<string, string>; [key: string]: unknown; }; ComputedStartUtc?: null | string; ComputedEndUtc?: null | string; SecondsRemaining?: null | number; UserState?: null | UserSeasonState; NextTier?: null | { Tier?: null | number; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; RequiredTokens?: null | number; TierReachedReward?: null | ResourceGrant; [key: string]: unknown; }; [key: string]: unknown; };
705
833
  type GrantStatusTokensResponse = { SeasonChainID: string; NewTier: number; CurrentSeasonID?: null | string; AmountGranted?: null | number; NewStatusTokens?: null | number; OldTier?: null | number; TierUp?: null | boolean; };
706
834
  type ClaimTierRewardResponse = { SeasonChainID: string; TierNumber: number; CurrentSeasonID?: null | string; Resources?: null | ResourceOperation; };
835
+ type ClaimTierRewardsBatchResponse = { ServerTimeUtc: string; Items: Array<{ Id: string; Success: boolean; Error?: null | string; Data?: null | ClaimTierRewardResponse; }>; Resources?: null | ResourceOperation; };
707
836
  type SeasonChainDefinition = { SeasonChainID?: null | string; DisplayName?: null | string; Schedule?: null | ScheduleSpec; Seasons?: null | Array<{ SeasonID?: null | string; Order?: null | number; DurationSec?: null | number; DisplayName?: null | string; Description?: null | string; AssetPaths?: null | Record<string, string>; Tiers?: null | Array<{ Tier?: null | number; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; RequiredTokens?: null | number; TierReachedReward?: null | ResourceGrant; [key: string]: unknown; }>; LinkedCollectionID?: null | string; CustomParams?: null | Record<string, string>; [key: string]: unknown; }>; GrantTokensAccessMode?: null | string; Gate?: null | SegmentGate; [key: string]: unknown; };
708
837
  /** Root configuration of the title's season system, returned by getDefinitions(). */
709
838
  interface SeasonDefinitions {
@@ -713,6 +842,12 @@ interface SeasonRequest extends BaseRequest {
713
842
  SeasonChainID?: string;
714
843
  Amount?: number;
715
844
  TierNumber?: number;
845
+ /**
846
+ * ClaimTierRewardsBatch: tier numbers to claim. Non-positive entries are dropped, the rest is
847
+ * deduped keeping order and clamped to the platform batch size. Needed because tiers are
848
+ * reached in batches — one token grant can raise the player through several at once.
849
+ */
850
+ TierNumbers?: number[];
716
851
  }
717
852
  declare const SeasonAction: {
718
853
  readonly GetDefinitions: "GetDefinitions";
@@ -720,6 +855,7 @@ declare const SeasonAction: {
720
855
  readonly GetUserState: "GetUserState";
721
856
  readonly GrantStatusTokens: "GrantStatusTokens";
722
857
  readonly ClaimTierReward: "ClaimTierReward";
858
+ readonly ClaimTierRewardsBatch: "ClaimTierRewardsBatch";
723
859
  };
724
860
  type SeasonAction = (typeof SeasonAction)[keyof typeof SeasonAction];
725
861
 
@@ -891,10 +1027,10 @@ interface UserMatchState {
891
1027
  CreationLimits?: UserMatchCreationLimitState | null;
892
1028
  }
893
1029
  type BattleResult = { WinnerUserID?: null | string; LoserUserID?: null | string; Entry?: null | ResourceBundle; NetReward?: null | ResourceBundle; BattleLog?: null | Array<{ RoundIndex?: null | number; AttackerID?: null | string; DefenderID?: null | string; AttackZone?: null | 'Head' | 'Torso' | 'Legs'; DefenseZone?: null | 'Head' | 'Torso' | 'Legs'; HitType?: null | 'Hit' | 'Critical' | 'Block' | 'Dodge'; DamageDealt?: null | number; DefenderHpRemaining?: null | number; [key: string]: unknown; }>; IsDraw?: null | boolean; P1BattleProfile?: null | { UserID?: null | string; SelectedCharacterID?: null | string; SelectedCharacter?: null | CharacterModel; BattleStrategy?: null | Array<BattleStepConfig>; UnstackableItems?: null | Record<string, UnstackableItemInstanceState>; Stats?: null | { MaxHp?: null | number; CurrentHp?: null | number; Damage?: null | number; AttackSpeed?: null | number; CritChance?: null | number; CritMultiplier?: null | number; Armor?: null | number; DodgeChance?: null | number; [key: string]: unknown; }; [key: string]: unknown; }; P2BattleProfile?: null | { UserID?: null | string; SelectedCharacterID?: null | string; SelectedCharacter?: null | CharacterModel; BattleStrategy?: null | Array<BattleStepConfig>; UnstackableItems?: null | Record<string, UnstackableItemInstanceState>; Stats?: null | { MaxHp?: null | number; CurrentHp?: null | number; Damage?: null | number; AttackSpeed?: null | number; CritChance?: null | number; CritMultiplier?: null | number; Armor?: null | number; DodgeChance?: null | number; [key: string]: unknown; }; [key: string]: unknown; }; [key: string]: unknown; };
894
- type PvPMatch = { MatchID: string; TitleID?: null | string; RuleID?: null | string; CreatedAt?: null | string; CreatorID?: null | string; CreatorCharacterID?: null | string; CreatorStrategy?: null | Array<BattleStepConfig>; TargetUserID?: null | string; Entry?: null | ResourceBundle; CreationCostPaid?: null | ResourceBundle; RefundCreationCostOnCancel?: null | boolean; JoinedByUserID?: null | string; JoinedByCharacterID?: null | string; JoinedAt?: null | string; Status?: null | 'Completed' | 'Open' | 'InProgress' | 'Cancelled'; WinnerUserID?: null | string; CompletedAt?: null | string; IsRewardDistributed?: null | boolean; RewardDistributedAt?: null | string; [key: string]: unknown; };
895
- type CreateMatchResponse = { Status: 'Completed' | 'Open' | 'InProgress' | 'Cancelled'; MatchID: string; Entry?: null | ResourceBundle; Resources?: null | ResourceOperation; };
1030
+ type PvPMatch = { MatchID: string; TitleID?: null | string; RuleID?: null | string; CreatedAt?: null | string; CreatorID?: null | string; CreatorCharacterID?: null | string; CreatorStrategy?: null | Array<BattleStepConfig>; TargetUserID?: null | string; Entry?: null | ResourceBundle; CreationCostPaid?: null | ResourceBundle; RefundCreationCostOnCancel?: null | boolean; JoinedByUserID?: null | string; JoinedByCharacterID?: null | string; JoinedAt?: null | string; Status?: null | 'Completed' | 'InProgress' | 'Open' | 'Cancelled'; WinnerUserID?: null | string; CompletedAt?: null | string; IsRewardDistributed?: null | boolean; RewardDistributedAt?: null | string; [key: string]: unknown; };
1031
+ type CreateMatchResponse = { Status: 'Completed' | 'InProgress' | 'Open' | 'Cancelled'; MatchID: string; Entry?: null | ResourceBundle; Resources?: null | ResourceOperation; };
896
1032
  type UpdateMatchResponse = { Match?: null | PvPMatch; };
897
- type CancelMatchResponse = { MatchID: string; Status: 'Completed' | 'Open' | 'InProgress' | 'Cancelled'; Resources?: null | ResourceOperation; };
1033
+ type CancelMatchResponse = { MatchID: string; Status: 'Completed' | 'InProgress' | 'Open' | 'Cancelled'; Resources?: null | ResourceOperation; };
898
1034
  type InstantBattleResponse = { Battle?: null | BattleResult; Resources?: null | ResourceOperation; ResourcesDual?: null | ResourceDualPartyResult; };
899
1035
  type MatchesPageResponse = { Matches?: null | Array<PvPMatch>; Page?: null | number; PageSize?: null | number; HasMore?: null | boolean; };
900
1036
  interface MatchRequest extends BaseRequest {
@@ -981,8 +1117,9 @@ interface UserCollectionState {
981
1117
  [key: string]: unknown;
982
1118
  }
983
1119
  type GrantedCollectible = { CollectibleID: string; Rarity?: null | number; IsSpecial?: null | boolean; IsDuplicate?: null | boolean; CollectionCurrencyConverted?: null | number; };
984
- type OpenPackResponse = { GrantedCollectibles?: null | Array<GrantedCollectible>; DuplicateCollectibles?: null | Array<GrantedCollectible>; CollectionCurrencyEarned?: null | number; NewCollectionCurrencyBalance?: null | number; NewlyCompletedSetIDs?: null | Array<string>; CollectionJustCompleted?: null | boolean; Resources?: null | ResourceOperation; TriggeredPity?: null | Array<unknown>; };
985
- type OpenCollectionChestResponse = { GrantedCollectibles?: null | Array<GrantedCollectible>; DuplicateCollectibles?: null | Array<GrantedCollectible>; CollectionCurrencyEarned?: null | number; NewCollectionCurrencyBalance?: null | number; Resources?: null | ResourceOperation; TriggeredPity?: null | Array<unknown>; };
1120
+ type PackOpenResult = { GrantedCollectibles?: null | Array<GrantedCollectible>; DuplicateCollectibles?: null | Array<GrantedCollectible>; CollectionCurrencyEarned?: null | number; };
1121
+ type OpenPackResponse = { OpenedCount?: null | number; Packs?: null | Array<PackOpenResult>; GrantedCollectibles?: null | Array<GrantedCollectible>; DuplicateCollectibles?: null | Array<GrantedCollectible>; CollectionCurrencyEarned?: null | number; NewCollectionCurrencyBalance?: null | number; NewlyCompletedSetIDs?: null | Array<string>; CollectionJustCompleted?: null | boolean; Resources?: null | ResourceOperation; TriggeredPity?: null | Array<unknown>; };
1122
+ type OpenCollectionChestResponse = { OpenedCount?: null | number; Chests?: null | Array<PackOpenResult>; GrantedCollectibles?: null | Array<GrantedCollectible>; DuplicateCollectibles?: null | Array<GrantedCollectible>; CollectionCurrencyEarned?: null | number; NewCollectionCurrencyBalance?: null | number; Resources?: null | ResourceOperation; TriggeredPity?: null | Array<unknown>; };
986
1123
  type UseCollectibleJokerResponse = { GrantedCollectibleID?: null | string; NewlyCompletedSetID?: null | string; CollectionJustCompleted?: null | boolean; Resources?: null | ResourceOperation; };
987
1124
  type ClaimSetRewardResponse = { SetID: string; Resources?: null | ResourceOperation; };
988
1125
  type ClaimSetRewardsBatchResponse = Array<{ Id: string; Success: boolean; Error?: null | string; Data?: null | ClaimSetRewardResponse; }>;
@@ -994,13 +1131,22 @@ type AcceptTradeOfferResponse = { OfferID: string; ReceivedCollectibleID?: null
994
1131
  type DeclineTradeOfferResponse = { OfferID: string; Resources?: null | ResourceOperation; };
995
1132
  type GetTradeOffersResponse = { Offers?: null | Array<CollectionTradeOfferDocument>; };
996
1133
  type CollectionDefinition = { CollectionID?: null | string; DisplayName?: null | string; Description?: null | string; AssetPaths?: null | Record<string, string>; SeasonChainID?: null | string; Sets?: null | Array<{ SetID?: null | string; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; SortOrder?: null | number; Collectibles?: null | Array<{ CollectibleID?: null | string; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; Rarity?: null | number; HasSpecialVersion?: null | boolean; SortOrder?: null | number; [key: string]: unknown; }>; SetCompletionReward?: null | ResourceGrant; [key: string]: unknown; }>; GrandPrize?: null | ResourceGrant; [key: string]: unknown; };
997
- type CollectionPackTypeDefinition = { PackTypeID?: null | string; Cost?: null | ResourceConsume; BonusRewardSlots?: null | Array<LootboxRewardSlot>; PityRules?: null | Array<LootboxPityRule>; Presets?: null | { BonusRewardSlots?: null | PresetBinding; PityRules?: null | PresetBinding; [key: string]: unknown; }; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; CollectibleCount?: null | number; GuaranteedMinRarity?: null | number; GuaranteeMaxRarity?: null | boolean; RarityWeights?: null | Record<string, number>; ColorTier?: null | number; [key: string]: unknown; };
1134
+ type CollectionPackTypeDefinition = { PackTypeID?: null | string; Cost?: null | ResourceConsume; BonusRewardSlots?: null | Array<LootboxRewardSlot>; PityRules?: null | Array<LootboxPityRule>; Presets?: null | { BonusRewardSlots?: null | PresetBinding; PityRules?: null | PresetBinding; [key: string]: unknown; }; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; CollectibleCount?: null | number; MaxOpenCount?: null | number; GuaranteedMinRarity?: null | number; GuaranteeMaxRarity?: null | boolean; RarityWeights?: null | Record<string, number>; ColorTier?: null | number; [key: string]: unknown; };
998
1135
  type DuplicateCollectionCurrencyConversion = { Rarity?: null | number; CollectionCurrencyGranted?: null | number; [key: string]: unknown; };
999
- type CollectionChestDefinition = { CollectionChestID?: null | string; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; CollectionCurrencyCost?: null | number; MinCollectibleCount?: null | number; MaxCollectibleCount?: null | number; GuaranteedMinRarity?: null | number; BonusRewardSlots?: null | Array<LootboxRewardSlot>; PityRules?: null | Array<LootboxPityRule>; Presets?: null | { BonusRewardSlots?: null | PresetBinding; PityRules?: null | PresetBinding; [key: string]: unknown; }; Tier?: null | number; [key: string]: unknown; };
1136
+ type CollectionChestDefinition = { CollectionChestID?: null | string; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; CollectionCurrencyCost?: null | number; MaxOpenCount?: null | number; MinCollectibleCount?: null | number; MaxCollectibleCount?: null | number; GuaranteedMinRarity?: null | number; BonusRewardSlots?: null | Array<LootboxRewardSlot>; PityRules?: null | Array<LootboxPityRule>; Presets?: null | { BonusRewardSlots?: null | PresetBinding; PityRules?: null | PresetBinding; [key: string]: unknown; }; Tier?: null | number; [key: string]: unknown; };
1000
1137
  type SpecialTradeEventDefinition = { SpecialTradeEventID?: null | string; StartUtc?: null | string; EndUtc?: null | string; AllowedSpecialCollectibleIDs?: null | Array<string>; SpecialTradeEventDailyTradeLimit?: null | number; [key: string]: unknown; };
1001
1138
  /** The title's collection-system config (config), returned by getCollectionDefinitions(). */
1139
+ /** Module-wide Collection settings shared by every collection and pack type of the title. */
1140
+ interface CollectionGlobalSettings {
1141
+ /** Max packs per single OpenPack call. null = platform default (100). <= 0 = disabled. */
1142
+ MaxPackOpenCount?: number | null;
1143
+ /** Same for collection chests (OpenCollectionChest) — a separate knob. */
1144
+ MaxChestOpenCount?: number | null;
1145
+ }
1002
1146
  interface CollectionDefinitions {
1003
1147
  Collections?: Record<string, CollectionDefinition> | null;
1148
+ /** Module-wide settings (multi-open ceilings). null = platform defaults apply. */
1149
+ Settings?: CollectionGlobalSettings | null;
1004
1150
  PackTypes?: Record<string, CollectionPackTypeDefinition> | null;
1005
1151
  CollectionChests?: CollectionChestDefinition[] | null;
1006
1152
  DuplicateConversions?: DuplicateCollectionCurrencyConversion[] | null;
@@ -1028,6 +1174,11 @@ interface CollectionRequest extends BaseRequest {
1028
1174
  RequestedCollectibleID?: string;
1029
1175
  RequestedCollectibleIsSpecial?: boolean;
1030
1176
  OfferID?: string;
1177
+ /**
1178
+ * How many packs/chests to open in a single OpenPack / OpenCollectionChest call. Default 1.
1179
+ * Clamped to [1, MaxOpenCount].
1180
+ */
1181
+ Count?: number;
1031
1182
  }
1032
1183
  declare const CollectionAction: {
1033
1184
  readonly GetDefinitions: "GetDefinitions";
@@ -1084,7 +1235,7 @@ type CoopPartnerObjectState = { Index?: null | number; OwnerUserID?: null | stri
1084
1235
  type CoopBuildObjectsState = { Objects?: null | Array<CoopPartnerObjectState>; [key: string]: unknown; };
1085
1236
  type CoopGroupDocument = { GroupID?: null | string; TitleID?: null | string; CoopChainID?: null | string; CoopEventID?: null | string; CycleIndex?: null | number; Members?: null | Array<CoopGroupMember>; BuildObjectsState?: null | CoopBuildObjectsState; Status?: null | string; CreatedAtUtc?: null | string; ExpiresAtUtc?: null | string; Version?: null | number; [key: string]: unknown; };
1086
1237
  type ActiveCoopEventInfo = { CoopChainID: string; [key: string]: unknown; };
1087
- type CoopEventDefinition = { CoopEventID?: null | string; Order?: null | number; DurationSec?: null | number; DisplayName?: null | string; Description?: null | string; AssetPaths?: null | Record<string, string>; EventType?: null | string; PartnerCount?: null | number; MatchmakingTimeoutMinutes?: null | number; MemberGracePeriodMinutes?: null | number; BuildObjects?: null | { Objects?: null | Array<{ Index?: null | number; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; MaxProgress?: null | number; CompletionReward?: null | ResourceGrant; [key: string]: unknown; }>; SpinCost?: null | ResourceConsume; SpinnerTable?: null | Array<{ DisplayName?: null | string; AssetPaths?: null | Record<string, string>; Weight?: null | number; MinProgress?: null | number; MaxProgress?: null | number; [key: string]: unknown; }>; [key: string]: unknown; }; GrandPrize?: null | ResourceGrant; [key: string]: unknown; };
1238
+ type CoopEventDefinition = { CoopEventID?: null | string; Order?: null | number; DurationSec?: null | number; DisplayName?: null | string; Description?: null | string; AssetPaths?: null | Record<string, string>; EventType?: null | string; PartnerCount?: null | number; MatchmakingTimeoutMinutes?: null | number; MemberGracePeriodMinutes?: null | number; BuildObjects?: null | { Objects?: null | Array<{ Index?: null | number; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; MaxProgress?: null | number; CompletionReward?: null | ResourceGrant; [key: string]: unknown; }>; SpinCost?: null | ResourceConsume; SpinnerTable?: null | Array<{ DisplayName?: null | string; AssetPaths?: null | Record<string, string>; Weight?: null | number; MinProgress?: null | number; MaxProgress?: null | number; [key: string]: unknown; }>; MaxSpinsPerCall?: null | number; [key: string]: unknown; }; GrandPrize?: null | ResourceGrant; [key: string]: unknown; };
1088
1239
  /** A coop event chain: cyclic schedule + ordered events + audience gate. */
1089
1240
  interface CoopEventChainDefinition {
1090
1241
  CoopChainID?: string | null;
@@ -1096,7 +1247,7 @@ interface CoopEventChainDefinition {
1096
1247
  }
1097
1248
  type CoopUserStateResponse = { ServerTimeUtc?: null | string; UserState?: null | UserCoopEventState; ActiveGroup?: null | CoopGroupDocument; };
1098
1249
  type CoopGroupStateResponse = { ServerTimeUtc?: null | string; Group?: null | CoopGroupDocument; SecondsRemaining?: null | number; };
1099
- type CoopSpinResponse = { ServerTimeUtc?: null | string; GroupID?: null | string; Resources?: null | ResourceOperation; ObjectIndex?: null | number; Sector?: null | { DisplayName?: null | string; AssetPaths?: null | Record<string, string>; Weight?: null | number; MinProgress?: null | number; MaxProgress?: null | number; [key: string]: unknown; }; ProgressDelta?: null | number; NewProgress?: null | number; MaxProgress?: null | number; ObjectCompleted?: null | boolean; AllObjectsCompleted?: null | boolean; };
1250
+ type CoopSpinResponse = { ServerTimeUtc?: null | string; GroupID?: null | string; Resources?: null | ResourceOperation; ObjectIndex?: null | number; Sector?: null | { DisplayName?: null | string; AssetPaths?: null | Record<string, string>; Weight?: null | number; MinProgress?: null | number; MaxProgress?: null | number; [key: string]: unknown; }; RequestedSpins?: null | number; SpinsUsed?: null | number; Sectors?: null | Array<{ DisplayName?: null | string; AssetPaths?: null | Record<string, string>; Weight?: null | number; MinProgress?: null | number; MaxProgress?: null | number; [key: string]: unknown; }>; ProgressDelta?: null | number; NewProgress?: null | number; MaxProgress?: null | number; ObjectCompleted?: null | boolean; AllObjectsCompleted?: null | boolean; };
1100
1251
  type CoopClaimRewardResponse = { ServerTimeUtc?: null | string; GroupID?: null | string; RewardType?: null | string; Resources?: null | ResourceOperation; };
1101
1252
  type CoopLeaveGroupResponse = { ServerTimeUtc?: null | string; GroupID?: null | string; Success?: null | boolean; };
1102
1253
  /** Root config of the title's cooperative events system. Plugs into TitlePublicConfig as CoopEvent. */
@@ -1108,6 +1259,11 @@ interface CoopEventDefinitions {
1108
1259
  interface CoopEventRequest extends BaseRequest {
1109
1260
  CoopChainID?: string;
1110
1261
  GroupID?: string;
1262
+ /**
1263
+ * How many spins to perform in a single Spin call. Default 1. Clamped to
1264
+ * [1, MaxSpinsPerCall]. Only spins that actually happen are charged — see SpinsUsed.
1265
+ */
1266
+ Count?: number;
1111
1267
  }
1112
1268
  declare const CoopEventAction: {
1113
1269
  readonly GetDefinitions: "GetDefinitions";
@@ -1296,15 +1452,23 @@ interface ReferralDefinitionsResponse {
1296
1452
  type UserReferralStateResponse = { Referral?: null | UserReferralState; };
1297
1453
  type ActivateReferralCodeResponse = { ReferralCode?: null | string; IsFirstActivation?: null | boolean; Resources?: null | ResourceOperation; };
1298
1454
  type ClaimInviteRewardResponse = { RewardID?: null | string; Resources?: null | ResourceOperation; };
1455
+ type ClaimInviteRewardsBatchResponse = { ServerTimeUtc: string; Items: Array<{ Id: string; Success: boolean; Error?: null | string; Data?: null | ClaimInviteRewardResponse; }>; Resources?: null | ResourceOperation; };
1299
1456
  interface ReferralRequest extends BaseRequest {
1300
1457
  ReferralCode?: string;
1301
1458
  InviteRewardID?: string;
1459
+ /**
1460
+ * ClaimInviteRewardsBatch: invite-milestone IDs to claim. Deduped keeping order, clamped to
1461
+ * the platform batch size. Invalid entries (unknown / not reached / already claimed) fail as
1462
+ * their own item without dropping the batch.
1463
+ */
1464
+ InviteRewardIDs?: string[];
1302
1465
  }
1303
1466
  declare const ReferralAction: {
1304
1467
  readonly GetDefinitions: "GetDefinitions";
1305
1468
  readonly GetUserState: "GetUserState";
1306
1469
  readonly ActivateReferralCode: "ActivateReferralCode";
1307
1470
  readonly ClaimInviteReward: "ClaimInviteReward";
1471
+ readonly ClaimInviteRewardsBatch: "ClaimInviteRewardsBatch";
1308
1472
  };
1309
1473
  type ReferralAction = (typeof ReferralAction)[keyof typeof ReferralAction];
1310
1474
 
@@ -1330,7 +1494,8 @@ interface UserSocialState {
1330
1494
  Timeline?: SocialTimelineEvent[];
1331
1495
  }
1332
1496
  type FriendsListResponse = { Friends?: null | Array<FriendPublicProfile>; };
1333
- type FriendActionResponse = { TargetUserID?: null | string; Status?: null | string; };
1497
+ type SocialCounters = { FriendsCount?: null | number; IncomingRequestsCount?: null | number; OutgoingRequestsCount?: null | number; };
1498
+ type FriendActionResponse = { TargetUserID?: null | string; Status?: null | string; Target?: null | FriendPublicProfile; Counters?: null | SocialCounters; };
1334
1499
  type TimelineResponse = { Events?: null | Array<SocialTimelineEvent>; };
1335
1500
  interface SocialRequest extends BaseRequest {
1336
1501
  TargetUserID?: string;
@@ -1844,6 +2009,111 @@ declare const MarketplaceAction: {
1844
2009
  };
1845
2010
  type MarketplaceAction = (typeof MarketplaceAction)[keyof typeof MarketplaceAction];
1846
2011
 
2012
+ declare const LocalizationMissingKeyMode: {
2013
+ /** Render the key itself. Default — this is what keeps literal-name titles working. */
2014
+ readonly ReturnKey: "ReturnKey";
2015
+ /** Render the key wrapped in markers (⟦quest.daily.title⟧) — proofreading mode. */
2016
+ readonly ReturnMarkedKey: "ReturnMarkedKey";
2017
+ /** Render an empty string. */
2018
+ readonly ReturnEmpty: "ReturnEmpty";
2019
+ };
2020
+ type LocalizationMissingKeyMode = (typeof LocalizationMissingKeyMode)[keyof typeof LocalizationMissingKeyMode];
2021
+ /** One language offered to the player. */
2022
+ interface LocalizationLocaleDefinition {
2023
+ /** Readability mirror of the dictionary key; the KEY is the identifier. */
2024
+ Locale?: string | null;
2025
+ /**
2026
+ * Language name written IN THAT LANGUAGE ("Русский", "Deutsch") — an endonym, not a
2027
+ * translation: the picker is read by someone who may not know the current language.
2028
+ */
2029
+ DisplayName?: string | null;
2030
+ IsEnabled?: boolean | null;
2031
+ Order?: number | null;
2032
+ [k: string]: unknown;
2033
+ }
2034
+ /**
2035
+ * `TitlePublicConfigurationModel.Localization` — settings only. No translations here.
2036
+ */
2037
+ interface LocalizationDefinitions {
2038
+ IsEnabled?: boolean | null;
2039
+ /** Default locale, which is also the FALLBACK. Canonical form (lower-case, "-"). */
2040
+ DefaultLocale?: string | null;
2041
+ /** Keyed by canonical locale code ("en", "pt-br"). */
2042
+ Locales?: Record<string, LocalizationLocaleDefinition> | null;
2043
+ MissingKeyMode?: LocalizationMissingKeyMode | null;
2044
+ MaxEntriesPerLocale?: number | null;
2045
+ MaxValueLengthBytes?: number | null;
2046
+ [k: string]: unknown;
2047
+ }
2048
+ /** One table: which locale, which version, and where the artifact is. */
2049
+ interface LocalizationTableRef {
2050
+ Locale?: string | null;
2051
+ Version?: number | null;
2052
+ /** `null` — nothing to download, or the artifact could not be published. */
2053
+ Url?: string | null;
2054
+ [k: string]: unknown;
2055
+ }
2056
+ /**
2057
+ * `ClientState.Localization` — what to download and from where.
2058
+ *
2059
+ * `Fallback` is present only when the player's own locale is NOT fully translated. A fully
2060
+ * translated language carries ONE file, and edits to the default language then cost that player
2061
+ * nothing — this is the whole reason coverage is computed server-side.
2062
+ */
2063
+ interface LocalizationState {
2064
+ /** The locale the request was resolved to. Cache the table UNDER THIS, not under what you sent. */
2065
+ Locale?: string | null;
2066
+ /** `0` — no table exists for this locale (declared but untranslated). */
2067
+ Version?: number | null;
2068
+ Url?: string | null;
2069
+ Fallback?: LocalizationTableRef | null;
2070
+ [k: string]: unknown;
2071
+ }
2072
+ interface LocalizationRequest extends BaseRequest {
2073
+ /** Any form: "ru", "pt-BR", "pt_br". The server canonicalizes and resolves it. */
2074
+ Locale?: string;
2075
+ /** Version already held by the client. `0`/absent — nothing cached. */
2076
+ KnownVersion?: number;
2077
+ }
2078
+ declare const LocalizationAction: {
2079
+ readonly GetLocalizationManifest: "GetLocalizationManifest";
2080
+ readonly GetLocalizationTable: "GetLocalizationTable";
2081
+ };
2082
+ type LocalizationAction = (typeof LocalizationAction)[keyof typeof LocalizationAction];
2083
+ interface LocalizationLocaleInfo {
2084
+ Locale?: string | null;
2085
+ DisplayName?: string | null;
2086
+ Order?: number | null;
2087
+ /** `0` — the language is declared but has no table yet. */
2088
+ Version?: number | null;
2089
+ [k: string]: unknown;
2090
+ }
2091
+ /** Discovery: what exists, without downloading any table. */
2092
+ interface LocalizationManifestResponse {
2093
+ IsEnabled?: boolean | null;
2094
+ DefaultLocale?: string | null;
2095
+ MissingKeyMode?: LocalizationMissingKeyMode | null;
2096
+ ResolvedLocale?: string | null;
2097
+ Locales?: LocalizationLocaleInfo[] | null;
2098
+ [k: string]: unknown;
2099
+ }
2100
+ /**
2101
+ * A translation table delivered in the response BODY — the fallback for when the CDN artifact
2102
+ * is unavailable. `Entries` is exactly what the artifact file contains: a flat `{key: value}`
2103
+ * object.
2104
+ */
2105
+ interface LocalizationTableResponse {
2106
+ RequestedLocale?: string | null;
2107
+ Locale?: string | null;
2108
+ Version?: number | null;
2109
+ /** `true` — the client's version matched; `Entries` is absent. */
2110
+ NotModified?: boolean | null;
2111
+ Entries?: Record<string, string> | null;
2112
+ FallbackLocale?: string | null;
2113
+ FallbackVersion?: number | null;
2114
+ [k: string]: unknown;
2115
+ }
2116
+
1847
2117
  interface UserDailyCounters {
1848
2118
  PeriodStartUtc: string;
1849
2119
  Earned: number;
@@ -1955,6 +2225,7 @@ interface UserState {
1955
2225
  Lootbox?: UserLootboxState | null;
1956
2226
  Reward?: UserRewardState | null;
1957
2227
  Quest?: UserQuestState | null;
2228
+ Tutorial?: UserTutorialState | null;
1958
2229
  Leaderboard?: UserLeaderboardsState | null;
1959
2230
  Season?: UserSeasonsState | null;
1960
2231
  Premium?: UserPremiumState | null;
@@ -2014,6 +2285,15 @@ interface ClientState {
2014
2285
  * недействительна, состояние приходит целиком.
2015
2286
  */
2016
2287
  StateEpoch?: string | null;
2288
+ /**
2289
+ * Локализация: какую таблицу переводов качать и откуда. Устроено как конфиг тайтла — уезжает
2290
+ * ССЫЛКОЙ на immutable-артефакт, — но таблиц может понадобиться ДВЕ: своя и запасная, если
2291
+ * своя переведена не полностью.
2292
+ *
2293
+ * `null` — локализация у тайтла выключена. `UserService` разбирается с этим сам: качает,
2294
+ * кладёт в локальное хранилище и отдаёт `client.localization`.
2295
+ */
2296
+ Localization?: LocalizationState | null;
2017
2297
  [k: string]: unknown;
2018
2298
  }
2019
2299
  /**
@@ -2064,6 +2344,21 @@ interface UserRequest extends BaseRequest {
2064
2344
  * запроса, когда скачать артефакт не удалось; вручную задавать не нужно.
2065
2345
  */
2066
2346
  ForceInlineConfig?: boolean;
2347
+ /**
2348
+ * Локаль игрока в любой форме («ru», «pt-BR», «pt_br»). Сервер сводит её к объявленной
2349
+ * тайтлом и отвечает про результат в `ClientState.Localization.Locale`.
2350
+ *
2351
+ * Ставится SDK автоматически из `settings.locale` (по умолчанию — язык устройства);
2352
+ * задавать вручную нужно только при явной смене языка игроком.
2353
+ */
2354
+ Locale?: string;
2355
+ /**
2356
+ * Версии таблиц переводов, которые уже есть у клиента: «локаль → версия». Ставится SDK.
2357
+ *
2358
+ * Карта, а не одно число, потому что таблиц у клиента бывает две — своя и запасная, — и
2359
+ * устареть они могут независимо: правка английского не трогает версию русского.
2360
+ */
2361
+ KnownLocalizationVersions?: Record<string, number>;
2067
2362
  }
2068
2363
  declare const UserAction: {
2069
2364
  readonly GetClientState: "GetClientState";
@@ -2634,6 +2929,12 @@ interface TitlePublicConfigurationModel {
2634
2929
  Multiplayer?: MultiplayerDefinitions | null;
2635
2930
  UserCustomData?: UserCustomDataDefinitions | null;
2636
2931
  Referral?: ReferralDefinitions | null;
2932
+ /**
2933
+ * Localization SETTINGS only — which locales exist, which is the fallback, the limits. The
2934
+ * translation TABLES are delivered separately, one file per locale; use `client.localization`
2935
+ * rather than reading anything out of here.
2936
+ */
2937
+ Localization?: LocalizationDefinitions | null;
2637
2938
  [key: string]: unknown;
2638
2939
  }
2639
2940
  interface TitleRequest extends BaseRequest {
@@ -2666,6 +2967,7 @@ interface SdkEvents {
2666
2967
  "user:lootboxUpdated": void;
2667
2968
  "user:rewardUpdated": void;
2668
2969
  "user:questUpdated": void;
2970
+ "user:tutorialUpdated": void;
2669
2971
  "user:timedEventUpdated": void;
2670
2972
  "user:leaderboardUpdated": void;
2671
2973
  "user:seasonUpdated": void;
@@ -2722,6 +3024,32 @@ interface SdkEvents {
2722
3024
  * quest UI. Nothing to call to trigger it.
2723
3025
  */
2724
3026
  "quest:systemProgress": QuestProgressUpdate[];
3027
+ "tutorial:definitionsLoaded": TutorialDefinitions;
3028
+ "tutorial:userStateLoaded": GetUserTutorialStateResponse;
3029
+ "tutorial:flowStarted": TutorialFlowResponse;
3030
+ "tutorial:flowSkipped": TutorialFlowResponse;
3031
+ "tutorial:flowReset": TutorialFlowResponse;
3032
+ "tutorial:stepChanged": TutorialFlowResponse;
3033
+ "tutorial:stepsCompletedBatch": TutorialFlowBatchResponse;
3034
+ "tutorial:rewardClaimed": TutorialClaimResponse;
3035
+ /**
3036
+ * Steps the BACKEND advanced while handling some other call (Mode = SystemEvent). Arrives on
3037
+ * the response of the action that caused it — subscribe instead of polling the state.
3038
+ */
3039
+ "tutorial:systemProgress": TutorialStepProgress[];
3040
+ /**
3041
+ * Таблица переводов сменилась: игрок вошёл, переключил язык или издатель поправил тексты.
3042
+ * Подписка — штатный способ перерисовать уже нарисованные подписи: `t()` синхронна, поэтому
3043
+ * без сигнала интерфейс останется со старыми строками до следующей перерисовки.
3044
+ *
3045
+ * `fallbackLocale` не `null` — своя локаль переведена не полностью, часть надписей приедет
3046
+ * на языке по умолчанию.
3047
+ */
3048
+ "localization:changed": {
3049
+ locale: string | null;
3050
+ fallbackLocale: string | null;
3051
+ entryCount: number;
3052
+ };
2725
3053
  /**
2726
3054
  * New revisions of the state containers the backend changed while handling some other call
2727
3055
  * (a purchase, a claim, a roll). Rides on that call's response so the client can keep its
@@ -2761,6 +3089,8 @@ interface SdkEvents {
2761
3089
  "season:userStateLoaded": UserSeasonStateResponse;
2762
3090
  "season:statusTokensGranted": GrantStatusTokensResponse;
2763
3091
  "season:tierRewardClaimed": ClaimTierRewardResponse;
3092
+ /** Batch claim of several tier rewards applied in one atomic operation. */
3093
+ "season:tierRewardsBatchClaimed": ClaimTierRewardsBatchResponse;
2764
3094
  "premium:definitionsLoaded": PremiumDefinitionsResponse;
2765
3095
  "premium:stateLoaded": PremiumStateResponse;
2766
3096
  "premium:trialActivated": PremiumPurchaseResponse;
@@ -2826,6 +3156,8 @@ interface SdkEvents {
2826
3156
  "referral:userStateLoaded": UserReferralStateResponse;
2827
3157
  "referral:codeActivated": ActivateReferralCodeResponse;
2828
3158
  "referral:inviteRewardClaimed": ClaimInviteRewardResponse;
3159
+ /** Batch claim of several invite milestones applied in one atomic operation. */
3160
+ "referral:inviteRewardsBatchClaimed": ClaimInviteRewardsBatchResponse;
2829
3161
  "social:friendsListLoaded": FriendsListResponse;
2830
3162
  "social:incomingRequestsLoaded": FriendsListResponse;
2831
3163
  "social:recommendedFriendsLoaded": FriendsListResponse;
@@ -2945,6 +3277,15 @@ interface IDosGamesSettings {
2945
3277
  * перезапуск (React Native, встраивание в нативную оболочку).
2946
3278
  */
2947
3279
  readonly configStorage: ConfigStorage;
3280
+ /**
3281
+ * Локаль игрока, с которой стартует игра. По умолчанию — язык устройства; не определился —
3282
+ * пусто, и тогда сервер отдаст язык тайтла по умолчанию.
3283
+ *
3284
+ * Это ПОЖЕЛАНИЕ, а не факт: сервер сводит код к тому, на что тайтл реально переведён
3285
+ * («pt-BR» → «pt-br» → «en»), и отвечает результатом. Смотреть надо
3286
+ * `client.localization.locale`, а не это поле.
3287
+ */
3288
+ readonly locale: string;
2948
3289
  }
2949
3290
  interface SettingsInput {
2950
3291
  titleID: string;
@@ -2954,6 +3295,7 @@ interface SettingsInput {
2954
3295
  devBuild?: boolean;
2955
3296
  debugLogging?: boolean;
2956
3297
  configStorage?: ConfigStorage;
3298
+ locale?: string;
2957
3299
  }
2958
3300
 
2959
3301
  /**
@@ -2998,6 +3340,21 @@ declare class UserData {
2998
3340
  /** Stores the authoritative points-track snapshot in the Quest event-token bucket. */
2999
3341
  patchQuestPointsTracks(tracks: Record<string, QuestPointsTrackView> | null | undefined): void;
3000
3342
  patchGroupCompletionClaimed(cycleID: string, groupCompletionID: string): void;
3343
+ applyTutorial(data: UserTutorialState | null): void;
3344
+ /**
3345
+ * Fold a flow view returned by a mutating call into the cached state, so the game can read
3346
+ * `state.Tutorial` right after the call without waiting for a refresh.
3347
+ *
3348
+ * Only the fields the view actually carries are written. `CurrentStep` is deliberately NOT
3349
+ * stored: it is a copy of the CONFIG, and duplicating it into player state would give two
3350
+ * sources of truth for the same step the moment the config changes.
3351
+ */
3352
+ patchTutorialFlow(view: TutorialFlowView | null | undefined): void;
3353
+ /**
3354
+ * Apply step progress the backend advanced by itself (Mode = SystemEvent), delivered on the
3355
+ * response of whatever action caused it.
3356
+ */
3357
+ patchTutorialProgress(updates: readonly TutorialStepProgress[] | null | undefined): void;
3001
3358
  patchQuestProgressUpdates(updates: readonly QuestProgressUpdate[] | null | undefined): void;
3002
3359
  getQuestPointsProgress(cycleID: string): UserEventTokenProgress | null;
3003
3360
  applyActiveEvents(data: GetActiveEventsResponse | null): void;
@@ -3243,6 +3600,8 @@ declare class UserService {
3243
3600
  private baseRequest;
3244
3601
  private get configCache();
3245
3602
  private cache?;
3603
+ private get localizationCache();
3604
+ private locCache?;
3246
3605
  private get stateStore();
3247
3606
  private versionStore?;
3248
3607
  /**
@@ -3298,6 +3657,26 @@ declare class UserService {
3298
3657
  * refresh doesn't wipe the active board.
3299
3658
  */
3300
3659
  getClientStateExcept(excludeFields?: string[], excludeTitleFields?: string[]): Promise<OperationResult<ClientState>>;
3660
+ /**
3661
+ * Прикладывает к запросу локаль и версии уже сохранённых таблиц. Сервер по ним не станет
3662
+ * присылать ссылки на то, что у клиента и так свежее.
3663
+ *
3664
+ * Локаль берётся из уже применённой (игрок мог переключить язык руками), иначе из настроек
3665
+ * (по умолчанию — язык устройства). Пусто — сервер отдаст язык тайтла по умолчанию.
3666
+ */
3667
+ private prepareLocalization;
3668
+ /**
3669
+ * Достраивает таблицы переводов и отдаёт их `client.localization`.
3670
+ *
3671
+ * Порядок источников ТОТ ЖЕ, что у конфига тайтла, и по той же причине: хранилище (версия
3672
+ * совпала) → CDN → эндпоинт телом → устаревшая локальная копия. Отличие одно, и оно
3673
+ * принципиальное: **провал здесь игру НЕ роняет.** Конфига нет — играть не во что; переводов
3674
+ * нет — интерфейс покажет ключи. Поэтому `applyState` зовётся при любом исходе.
3675
+ */
3676
+ private applyLocalization;
3677
+ private resolveLocalizationTable;
3678
+ private fetchLocalizationFromCdn;
3679
+ private fetchLocalizationFromApi;
3301
3680
  /**
3302
3681
  * Только версии контейнеров — без единого байта данных.
3303
3682
  *
@@ -3397,6 +3776,194 @@ declare class RewardService {
3397
3776
  private baseRequest;
3398
3777
  }
3399
3778
 
3779
+ /**
3780
+ * Onboarding: flows of ordered steps that the server hands out, gates and closes.
3781
+ *
3782
+ * Two things the game must know before using this:
3783
+ *
3784
+ * 1. **Not every step is yours to close.** `completeStep` works only for steps whose
3785
+ * `Completion.Mode` is `ClientAck` (or `Auto`, which closes on being shown). A `SystemEvent`
3786
+ * step is closed by the backend off a real game event — a board roll, a purchase, a chest
3787
+ * open — and calling `completeStep` on it is refused. Read `CurrentStep.Completion.Mode` from
3788
+ * the flow view and only offer a "Next" button when it is `ClientAck`.
3789
+ * 2. **Progress can arrive on OTHER calls.** When a system-event step advances, the backend
3790
+ * attaches it to the response of the action that caused it, and the SDK applies it to the
3791
+ * cached state and emits `tutorial:systemProgress`. Subscribe to that instead of polling.
3792
+ */
3793
+ declare class TutorialService {
3794
+ private readonly ctx;
3795
+ constructor(ctx: ClientContext);
3796
+ /** Flow and step definitions of the title (presets already resolved server-side). */
3797
+ getTutorialDefinitions(): Promise<OperationResult<TutorialDefinitions>>;
3798
+ /**
3799
+ * Player state plus everything needed to draw the current step without a second call.
3800
+ *
3801
+ * @param autoStart Let the server start flows marked for auto-start. Pass `false` from a
3802
+ * settings screen that merely lists tutorials — otherwise opening it would begin one.
3803
+ */
3804
+ getUserTutorialState(autoStart?: boolean): Promise<OperationResult<GetUserTutorialStateResponse>>;
3805
+ /** Start a flow explicitly. Returns the flow with its first step. */
3806
+ startFlow(flowID: string): Promise<OperationResult<TutorialFlowResponse>>;
3807
+ /**
3808
+ * Report that the step was shown to the player. Worth calling for every step: it is what the
3809
+ * funnel measures time-on-step from, and a step with `Mode = Auto` closes on it.
3810
+ */
3811
+ reportStepShown(flowID: string, stepID: string): Promise<OperationResult<TutorialFlowResponse>>;
3812
+ /**
3813
+ * Close the current step by the player's acknowledgement.
3814
+ * Refused for `SystemEvent`/`Composite` steps — those are closed by the game event itself.
3815
+ */
3816
+ completeStep(flowID: string, stepID: string): Promise<OperationResult<TutorialFlowResponse>>;
3817
+ /**
3818
+ * Close several steps of one flow, in order — for a client catching up after being offline.
3819
+ * Steps are closed one by one: closing the third without the second stays impossible.
3820
+ */
3821
+ completeStepsBatch(flowID: string, stepIDs: string[]): Promise<OperationResult<TutorialFlowBatchResponse>>;
3822
+ /** Skip one step (only if the step declares itself skippable). */
3823
+ skipStep(flowID: string, stepID: string): Promise<OperationResult<TutorialFlowResponse>>;
3824
+ /**
3825
+ * Skip the whole flow. Allowed only when the flow is skippable AND the current step is at or
3826
+ * past `Policy.SkippableFromOrder` — the flow view's `CanSkip` tells you whether to show the
3827
+ * button at all.
3828
+ */
3829
+ skipFlow(flowID: string): Promise<OperationResult<TutorialFlowResponse>>;
3830
+ /**
3831
+ * Take the completion reward. Show this when the flow view reports `RewardPending`.
3832
+ * A flow with `Reward.AutoClaim` pays out on its last step and never reports it pending.
3833
+ */
3834
+ claimFlowReward(flowID: string): Promise<OperationResult<TutorialClaimResponse>>;
3835
+ /**
3836
+ * Replay a flow. Only for flows whose `RestartPolicy` allows it; the reward is NOT granted
3837
+ * again — the server keeps the claimed flag through the reset.
3838
+ */
3839
+ resetFlow(flowID: string): Promise<OperationResult<TutorialFlowResponse>>;
3840
+ private flowCall;
3841
+ private stepCall;
3842
+ /**
3843
+ * Fold the returned flow view into the cached player state. The view is authoritative for the
3844
+ * fields it carries, so the game can read `client.data.user.state.Tutorial` right after the
3845
+ * call without waiting for a state refresh.
3846
+ */
3847
+ private applyFlowView;
3848
+ /**
3849
+ * Batch and claim responses do not carry a flow view, so the cached state is re-read once.
3850
+ * Silent: a failed refresh must not turn a successful claim into an error for the player.
3851
+ */
3852
+ private refreshAfterMutation;
3853
+ private baseRequest;
3854
+ }
3855
+
3856
+ /** Значения для подстановки в перевод: `{count}`, `{name}` и т.п. */
3857
+ type LocalizationParams = Record<string, string | number>;
3858
+ /**
3859
+ * Локализация: перевод по ключу и загрузка таблиц.
3860
+ *
3861
+ * **Контракт резолва — `t(x) = своя таблица → запасная таблица → сам x`.** Последнее звено не
3862
+ * запасной вариант на случай ошибки, а часть замысла: у существующих тайтлов в конфиге лежат
3863
+ * готовые названия («Iron Sword» в `DisplayName`), и такой литерал — это просто ключ, для
3864
+ * которого перевода не нашлось. Поэтому оборачивать в `t()` можно ВСЁ, включая строки из
3865
+ * конфига, и ни один тайтл от этого не ломается.
3866
+ *
3867
+ * **Таблиц бывает две.** Свою локаль клиент качает всегда, запасную — только если своя
3868
+ * переведена не полностью; решает это сервер и сообщает в `ClientState.Localization.Fallback`.
3869
+ * У полностью переведённого языка файл один, и правки языка по умолчанию такому игроку ничего
3870
+ * не стоят.
3871
+ *
3872
+ * Загрузкой занимается `UserService` на входе в игру — здесь только применение и чтение.
3873
+ * Отдельно грузить ничего не надо; `setLocale` нужен, только когда язык меняет сам игрок.
3874
+ */
3875
+ declare class LocalizationService {
3876
+ private readonly ctx;
3877
+ constructor(ctx: ClientContext);
3878
+ private table;
3879
+ private fallbackTable;
3880
+ private currentLocale;
3881
+ private currentFallbackLocale;
3882
+ private pluralRules;
3883
+ private get cache();
3884
+ private tableCache?;
3885
+ /**
3886
+ * Локаль, на которой игра идёт СЕЙЧАС, — та, к которой сервер свёл запрошенную. `null`,
3887
+ * пока состояние не загружено или если локализация у тайтла выключена.
3888
+ *
3889
+ * Смотреть надо сюда, а не в `settings.locale`: там пожелание, здесь факт.
3890
+ */
3891
+ get locale(): string | null;
3892
+ /** Запасная локаль, если своя переведена не полностью. `null` — вторая таблица не нужна. */
3893
+ get fallbackLocale(): string | null;
3894
+ /**
3895
+ * Языки, объявленные тайтлом, — для меню выбора. Берутся из конфига (там же лежат эндонимы),
3896
+ * поэтому обращение к сети не нужно.
3897
+ */
3898
+ get locales(): LocalizationLocaleInfo[];
3899
+ /** Есть ли перевод для ключа (в своей таблице или в запасной). */
3900
+ has(key: string): boolean;
3901
+ /**
3902
+ * Перевод по ключу.
3903
+ *
3904
+ * Порядок: своя таблица → запасная → сам ключ (или то, что задано
3905
+ * `MissingKeyMode` в конфиге тайтла).
3906
+ *
3907
+ * Множественное число: передайте `{ count }` — сервер хранит формы суффиксами
3908
+ * (`items.count.one`, `.few`, `.many`, `.other`), а категорию выбирает `Intl.PluralRules`
3909
+ * ПО ТЕКУЩЕЙ ЛОКАЛИ. Своей таблицы правил здесь нет намеренно: у русского их три, у
3910
+ * польского четыре, у арабского шесть, и переписывать CLDR руками — верный способ разойтись
3911
+ * с ним на редкой локали.
3912
+ *
3913
+ * Подстановка: `{name}` в переводе заменяется на `params.name`. Отсутствующий параметр
3914
+ * оставляется как есть — видимый `{name}` на экране находится сразу, а молча пропавший
3915
+ * кусок текста не находится никогда.
3916
+ */
3917
+ t(key: string, params?: LocalizationParams): string;
3918
+ /**
3919
+ * Применяет блок, приехавший в `GetClientState`. Зовётся `UserService`; вызывать вручную не
3920
+ * нужно.
3921
+ *
3922
+ * Таблицы уже разрешены вызывающим (хранилище → CDN → эндпоинт), потому что порядок
3923
+ * источников общий с конфигом тайтла и живёт там же.
3924
+ */
3925
+ applyState(state: LocalizationState | null | undefined, tables: {
3926
+ table: Record<string, string> | null;
3927
+ fallbackTable: Record<string, string> | null;
3928
+ }): void;
3929
+ /**
3930
+ * Смена языка игроком.
3931
+ *
3932
+ * Идёт ЧЕРЕЗ ЭНДПОИНТ, а не через CDN, и это осознанно: ссылку на артефакт выдаёт только
3933
+ * `GetClientState`, а тянуть ради смены языка полное состояние игрока дороже, чем один раз
3934
+ * взять таблицу телом. Дальше она лежит в локальном хранилище и повторных загрузок не
3935
+ * стоит.
3936
+ *
3937
+ * Запасная таблица догружается тем же способом, если сервер сообщил, что она нужна.
3938
+ */
3939
+ setLocale(locale: string): Promise<OperationResult<string>>;
3940
+ /** Какие языки доступны и какие у их таблиц версии. Таблицы не качает. */
3941
+ getManifest(): Promise<OperationResult<LocalizationManifestResponse>>;
3942
+ private reset;
3943
+ private setLocaleInternal;
3944
+ private baseRequest;
3945
+ /**
3946
+ * Таблица телом + запись в локальное хранилище. Кэш проверяется ПЕРЕД запросом и
3947
+ * приезжает в `KnownVersion`: совпала версия — сервер записи не шлёт, и таблица берётся с
3948
+ * диска.
3949
+ */
3950
+ private loadTableFromApi;
3951
+ /** Значение из своей таблицы, иначе из запасной. */
3952
+ private lookup;
3953
+ /**
3954
+ * Ключ с учётом множественного числа. Без `count` — сам ключ; с ним — сначала форма для
3955
+ * категории CLDR, потом `other`.
3956
+ */
3957
+ private resolveKey;
3958
+ /**
3959
+ * Категория множественного числа по текущей локали. `Intl.PluralRules` может бросить на
3960
+ * некорректном языковом теге — тогда откатываемся к `other`: показать не ту форму хуже, чем
3961
+ * не показать ничего, но уронить кадр из-за перевода нельзя.
3962
+ */
3963
+ private pluralCategory;
3964
+ private onMissing;
3965
+ }
3966
+
3400
3967
  /** Port of QuestService.cs. */
3401
3968
  declare class QuestService {
3402
3969
  private readonly ctx;
@@ -3478,6 +4045,14 @@ declare class SeasonService {
3478
4045
  getUserState(seasonChainID: string): Promise<OperationResult<UserSeasonStateResponse>>;
3479
4046
  grantStatusTokens(seasonChainID: string, amount: number): Promise<OperationResult<GrantStatusTokensResponse>>;
3480
4047
  claimTierReward(seasonChainID: string, tierNumber: number): Promise<OperationResult<ClaimTierRewardResponse>>;
4048
+ /**
4049
+ * Claims the rewards of several tiers in ONE atomic backend operation.
4050
+ *
4051
+ * Exists because tiers are reached in BATCHES — a single token grant can raise the player
4052
+ * through several at once, leaving more than one reward unclaimed. The merged `Resources` is
4053
+ * applied ONCE from the top level; per-item `Data.Resources` is null by contract.
4054
+ */
4055
+ claimTierRewardsBatch(seasonChainID: string, tierNumbers: number[]): Promise<OperationResult<ClaimTierRewardsBatchResponse>>;
3481
4056
  private baseRequest;
3482
4057
  }
3483
4058
 
@@ -3587,8 +4162,16 @@ declare class CollectionService {
3587
4162
  constructor(ctx: ClientContext);
3588
4163
  getDefinitions(): Promise<OperationResult<CollectionDefinitions>>;
3589
4164
  getUserState(): Promise<OperationResult<UserCollectionState>>;
3590
- openPack(collectionID: string, packTypeID: string): Promise<OperationResult<OpenPackResponse>>;
3591
- openCollectionChest(collectionID: string, collectionChestID: string): Promise<OperationResult<OpenCollectionChestResponse>>;
4165
+ /**
4166
+ * Opens `count` packs in ONE atomic operation. The cost scales with the count and each pack
4167
+ * is rolled against the state left by the previous one, so a collectible dropping twice in a
4168
+ * row is correctly counted as a duplicate. `count` is clamped server-side to the configured
4169
+ * ceiling (pack type → module setting → platform default); the response reports what actually
4170
+ * happened in `OpenedCount` and breaks it down per pack in `Packs`.
4171
+ */
4172
+ openPack(collectionID: string, packTypeID: string, count?: number): Promise<OperationResult<OpenPackResponse>>;
4173
+ /** Opens `count` chests in ONE atomic operation. See openPack() for the multi-open contract. */
4174
+ openCollectionChest(collectionID: string, collectionChestID: string, count?: number): Promise<OperationResult<OpenCollectionChestResponse>>;
3592
4175
  useCollectibleJoker(collectionID: string, collectibleID: string): Promise<OperationResult<UseCollectibleJokerResponse>>;
3593
4176
  claimSetReward(collectionID: string, setID: string): Promise<OperationResult<ClaimSetRewardResponse>>;
3594
4177
  /** Claim rewards for several completed sets in one atomic operation (deduped by SetID). */
@@ -3612,7 +4195,14 @@ declare class CoopEventService {
3612
4195
  getUserState(): Promise<OperationResult<CoopUserStateResponse>>;
3613
4196
  getGroupState(groupID: string): Promise<OperationResult<CoopGroupStateResponse>>;
3614
4197
  joinOrCreateGroup(coopChainID: string): Promise<OperationResult<CoopGroupStateResponse>>;
3615
- spin(coopChainID: string, groupID: string): Promise<OperationResult<CoopSpinResponse>>;
4198
+ /**
4199
+ * Spins the wheel `count` times in ONE atomic operation.
4200
+ *
4201
+ * Only spins that actually happen are charged: the run stops at the spin that completes the
4202
+ * object, and the remainder is neither rolled nor billed — check `SpinsUsed` against
4203
+ * `RequestedSpins`. `count` is clamped server-side to `MaxSpinsPerCall`.
4204
+ */
4205
+ spin(coopChainID: string, groupID: string, count?: number): Promise<OperationResult<CoopSpinResponse>>;
3616
4206
  claimObjectReward(groupID: string): Promise<OperationResult<CoopClaimRewardResponse>>;
3617
4207
  claimGrandPrize(groupID: string): Promise<OperationResult<CoopClaimRewardResponse>>;
3618
4208
  leaveGroup(groupID?: string): Promise<OperationResult<CoopLeaveGroupResponse>>;
@@ -3642,6 +4232,15 @@ declare class ReferralService {
3642
4232
  getUserState(): Promise<OperationResult<UserReferralStateResponse>>;
3643
4233
  activateReferralCode(referralCode: string): Promise<OperationResult<ActivateReferralCodeResponse>>;
3644
4234
  claimInviteReward(inviteRewardID: string): Promise<OperationResult<ClaimInviteRewardResponse>>;
4235
+ /**
4236
+ * Claims several invite milestones in ONE atomic backend operation.
4237
+ *
4238
+ * The merged `Resources` of the batch is applied ONCE from the top level — per-item
4239
+ * `Data.Resources` is null by contract, so applying both would double count the grant.
4240
+ * Invalid items (unknown / not reached / already claimed) come back as failed elements
4241
+ * without dropping the rest of the batch.
4242
+ */
4243
+ claimInviteRewardsBatch(inviteRewardIDs: string[]): Promise<OperationResult<ClaimInviteRewardsBatchResponse>>;
3645
4244
  private baseRequest;
3646
4245
  }
3647
4246
 
@@ -3994,6 +4593,40 @@ declare class RewardApi {
3994
4593
  claimReward(request: RewardRequest): Promise<OperationResult<ClaimRewardResponse>>;
3995
4594
  }
3996
4595
 
4596
+ /** Thin transport wrapper for the Tutorial feature (port of TutorialV2). */
4597
+ declare class TutorialApi {
4598
+ private readonly ctx;
4599
+ constructor(ctx: ClientContext);
4600
+ private send;
4601
+ getTutorialDefinitions(request: TutorialRequest): Promise<OperationResult<TutorialDefinitions>>;
4602
+ getUserTutorialState(request: TutorialRequest): Promise<OperationResult<GetUserTutorialStateResponse>>;
4603
+ startFlow(request: TutorialRequest): Promise<OperationResult<TutorialFlowResponse>>;
4604
+ reportStepShown(request: TutorialRequest): Promise<OperationResult<TutorialFlowResponse>>;
4605
+ completeStep(request: TutorialRequest): Promise<OperationResult<TutorialFlowResponse>>;
4606
+ completeStepsBatch(request: TutorialRequest): Promise<OperationResult<TutorialFlowBatchResponse>>;
4607
+ skipStep(request: TutorialRequest): Promise<OperationResult<TutorialFlowResponse>>;
4608
+ skipFlow(request: TutorialRequest): Promise<OperationResult<TutorialFlowResponse>>;
4609
+ claimFlowReward(request: TutorialRequest): Promise<OperationResult<TutorialClaimResponse>>;
4610
+ resetFlow(request: TutorialRequest): Promise<OperationResult<TutorialFlowResponse>>;
4611
+ }
4612
+
4613
+ /** Thin transport wrapper for the Localization feature (port of LocalizationV2). */
4614
+ declare class LocalizationApi {
4615
+ private readonly ctx;
4616
+ constructor(ctx: ClientContext);
4617
+ private send;
4618
+ /** Which languages exist and what their table versions are. Downloads no table. */
4619
+ getLocalizationManifest(request: LocalizationRequest): Promise<OperationResult<LocalizationManifestResponse>>;
4620
+ /**
4621
+ * A translation table in the response body.
4622
+ *
4623
+ * This is the FALLBACK path: the main one is the immutable CDN artifact referenced by
4624
+ * `ClientState.Localization.Url`. Coming here is normal (first player after a translation
4625
+ * edit, blocked CDN, a manual language switch) — it just costs one more round trip.
4626
+ */
4627
+ getLocalizationTable(request: LocalizationRequest): Promise<OperationResult<LocalizationTableResponse>>;
4628
+ }
4629
+
3997
4630
  /** Thin transport wrapper for the Quest feature (port of QuestAPI.cs). */
3998
4631
  declare class QuestApi {
3999
4632
  private readonly ctx;
@@ -4059,6 +4692,7 @@ declare class SeasonApi {
4059
4692
  getUserState(request: SeasonRequest): Promise<OperationResult<UserSeasonStateResponse>>;
4060
4693
  grantStatusTokens(request: SeasonRequest): Promise<OperationResult<GrantStatusTokensResponse>>;
4061
4694
  claimTierReward(request: SeasonRequest): Promise<OperationResult<ClaimTierRewardResponse>>;
4695
+ claimTierRewardsBatch(request: SeasonRequest): Promise<OperationResult<ClaimTierRewardsBatchResponse>>;
4062
4696
  }
4063
4697
 
4064
4698
  /** Thin transport wrapper for the Premium feature (port of PremiumAPI.cs). */
@@ -4176,6 +4810,7 @@ declare class ReferralApi {
4176
4810
  getUserState(request: ReferralRequest): Promise<OperationResult<UserReferralStateResponse>>;
4177
4811
  activateReferralCode(request: ReferralRequest): Promise<OperationResult<ActivateReferralCodeResponse>>;
4178
4812
  claimInviteReward(request: ReferralRequest): Promise<OperationResult<ClaimInviteRewardResponse>>;
4813
+ claimInviteRewardsBatch(request: ReferralRequest): Promise<OperationResult<ClaimInviteRewardsBatchResponse>>;
4179
4814
  }
4180
4815
 
4181
4816
  /** Thin transport wrapper for the Social feature (port of SocialAPI.cs). */
@@ -4372,6 +5007,8 @@ declare class ClientContext {
4372
5007
  lootbox: LootboxApi;
4373
5008
  reward: RewardApi;
4374
5009
  quest: QuestApi;
5010
+ tutorial: TutorialApi;
5011
+ localization: LocalizationApi;
4375
5012
  timedEvent: TimedEventApi;
4376
5013
  leaderboard: LeaderboardApi;
4377
5014
  season: SeasonApi;
@@ -4402,6 +5039,8 @@ declare class ClientContext {
4402
5039
  readonly lootbox: LootboxService;
4403
5040
  readonly reward: RewardService;
4404
5041
  readonly quest: QuestService;
5042
+ readonly tutorial: TutorialService;
5043
+ readonly localization: LocalizationService;
4405
5044
  readonly timedEvent: TimedEventService;
4406
5045
  readonly leaderboard: LeaderboardService;
4407
5046
  readonly season: SeasonService;
@@ -4446,6 +5085,13 @@ declare class IDosGamesClient {
4446
5085
  get lootbox(): LootboxService;
4447
5086
  get reward(): RewardService;
4448
5087
  get quest(): QuestService;
5088
+ /** Onboarding flows: start, advance, skip and claim tutorial steps. */
5089
+ get tutorial(): TutorialService;
5090
+ /**
5091
+ * Переводы: `t(key)` и смена языка. Загружать ничего не нужно — таблицы приезжают вместе с
5092
+ * состоянием на входе в игру.
5093
+ */
5094
+ get localization(): LocalizationService;
4449
5095
  get timedEvent(): TimedEventService;
4450
5096
  get leaderboard(): LeaderboardService;
4451
5097
  get season(): SeasonService;
@@ -4583,4 +5229,46 @@ type MailboxMessageDocument = { MessageID?: null | string; TitleID?: null | stri
4583
5229
  type MailboxBroadcastDocument = { BroadcastID?: null | string; TitleID?: null | string; MessageTypeID?: null | string; Subject?: null | string; Body?: null | string; TemplateParams?: null | Record<string, string>; AssetPaths?: null | Record<string, string>; Rewards?: null | ResourceGrant; TargetSegmentID?: null | string; TargetUserIDs?: null | Array<string>; StartsAtUtc?: null | string; ExpiresAtUtc?: null | string; CreatedAtUtc?: null | string; CreatedByAdminID?: null | string; AdminComment?: null | string; Status?: null | 'Active' | 'Completed' | 'Cancelled' | 'Paused'; DeliveredCount?: null | number; ClaimedCount?: null | number; [key: string]: unknown; };
4584
5230
  type UserMailboxState = { UnreadCount?: null | number; UnclaimedRewardCount?: null | number; LastFetchCursor?: null | string; ReceivedBroadcastIDs?: null | Array<string>; ClaimedBroadcastIDs?: null | Array<string>; DailyP2PGiftsSent?: null | number; DailyGiftsResetDate?: null | string; LastOpenedAtUtc?: null | string; TotalMessagesReceived?: null | number; TotalRewardsClaimed?: null | number; [key: string]: unknown; };
4585
5231
 
4586
- export { type AcceptTradeOfferResponse, type ActivateReferralCodeResponse, type ActivateTimedBoostResponse, type ActiveBoostWindowInfo, type ActiveCoopEventInfo, type ActiveDealSlotInfo, type ActiveEventInfo, type ActiveSeasonInfo, type ActiveTimedBoost, type AdConsentSettings, type AdConsentState, type AdCreditsData, type AdDailyData, type AdFraudFlags, type AdFrequencyCappingSettings, type AdPendingRequest, type AdPlacementDefinition, type AdPlacementUserState, type AdProviderDefinition, type AdSessionData, AdType, type AdUnitConfig, type AdVerificationSettings, type AddQuestProgressResponse, type AdvertisingDefinitions, type AppOpenSettings, AttackOutcome, type AttackResponse, type AttributionInput, type AuthContext, AuthType, AuthenticationAction, type AuthenticationRequest, AuthenticationService, BannerPosition, type BannerSettings, type BaseRequest, type BatchDeleteUserCustomDataResponse, type BatchGetPublicUserCustomDataResponse, type BatchItemResult, type BatchResponse, type BatchSetUserCustomDataResponse, type BattleResult, type BattleStepConfig, type BlockchainAccountSafetyPolicy, BlockchainAction, type BlockchainConfigResponse, type BlockchainDefinitions, type BlockchainNetworkDefinition, BlockchainNetworkType, type BlockchainNftCollectionBinding, BlockchainOperationCategory, type BlockchainRequest, BlockchainService, type BlockchainStats, type BlockchainSystemState, BlockchainTransactionStatus, BlockchainTransactionType, type BoardLoopDefinition, type BoardLoopState, type BoardPendingInteraction, type BoardRollResponse, BodyPart, type BoostTriggerCounter, BoostWindowKind, BroadcastStatus, type BuildResponse, type BuildingState, type CancelMatchResponse, type CancelTradeOfferResponse, type ChangeUsernameResponse, CharacterAction, type CharacterClassification, type CharacterDefinition, type CharacterDefinitions, type CharacterEquipment, type CharacterEquipmentSlot, type CharacterIdentity, type CharacterLevelDefinition, type CharacterLevelRef, type CharacterModel, type CharacterRequest, CharacterService, type CharacterStatRef, type CharacterUnequipResult, type CharacterUnlock, type ClaimAllRewardsBatchResponse, type ClaimAllRewardsResult, type ClaimComebackRewardResponse, type ClaimCycleRewardResponse, type ClaimCycleRewardsBatchResponse, type ClaimDailyRewardResponse, type ClaimDealMilestoneResponse, type ClaimDealMilestonesBatchResponse, type ClaimGrandPrizeResponse, type ClaimGroupCompletionRewardResponse, type ClaimInviteRewardResponse, type ClaimLeaderboardMilestoneResponse, type ClaimLeaderboardMilestonesBatchResponse, type ClaimMilestoneRewardResponse, type ClaimMilestoneRewardsBatchResponse, type ClaimMilestonesBatchResponse, type ClaimQuestRewardResponse, type ClaimQuestRewardsBatchResponse, type ClaimRewardResponse, type ClaimSetRewardResponse, type ClaimSetRewardsBatchResponse, type ClaimTierRewardResponse, type ClientState, CloudCodeAction, CloudCodeErrorCode, type CloudCodeLogEntry, CloudCodeLogLevel, type CloudCodeRequest, CloudCodeRevisionSelection, CloudCodeService, type CodeExecutionError, type CollectIdleAccrualResponse, CollectionAction, type CollectionDefinitions, type CollectionRequest, CollectionService, type CollectionSetRef, type CollectionTradeOfferDocument, CommissionSink, type CommunityChestClaimResponse, type CommunityChestGroupDocument, type CommunityChestGroupStateResponse, type CommunityChestHistoryEntry, type CommunityChestLeaveResponse, type CommunityChestMember, CommunityChestMemberStatus, type CommunityChestSharedState, CommunityChestStatus, type CommunityChestUserStateResponse, type ConfirmWithdrawalResponse, type ConversionDailyCounter, ConversionRateMode, type ConversionTarget, type ConvertResponse, type CoopBuildObjectsMemberState, type CoopBuildObjectsState, type CoopClaimRewardResponse, CoopEventAction, type CoopEventDefinitions, type CoopEventRequest, CoopEventService, type CoopGroupDocument, type CoopGroupMember, type CoopGroupStateResponse, CoopGroupStatus, type CoopLeaveGroupResponse, CoopMemberStatus, type CoopPartnerObjectState, type CoopSpinResponse, type CoopUserStateResponse, CraftAction, type CraftDefinitions, type CraftDefinitionsResponse, type CraftRequest, type CraftResponse, CraftService, type CraftSingleResult, CraftType, type CreateMatchResponse, type CryptoConvertResponse, type CryptoCurrencyDefinition, type CryptoCurrencyPermissions, type CryptoLimits, type CryptoNetworkBinding, CurrencyAction, type CurrencyAudit, type CurrencyConversion, type CurrencyDefinitions, type CurrencyRequest, CurrencyService, CurrencyStatus, CurrencyType, CustomDataBucket, CustomDataValueType, CustomDataWriter, type CyclicSchedule, DEFAULT_BASE_URL, type DailyUsageRecord, type DealMilestoneProgressInfo, DealNodeRuntimeStatus, DealOfferAction, DealOfferActivationStatus, type DealOfferDefinitions, type DealOfferRequest, DealOfferService, type DealOffersDefinitionResponse, type DeclineTradeOfferResponse, type DepositNFTResponse, type DepositTokenResponse, type DismissDealResponse, type DonationResponse, EnvelopeType, type EquipItemsResponse, type EquipSlotPair, type EquipmentPreset, type EquipmentSlot, type EquippedItem, type EventMap, type EventMilestoneClaimResponse, type EventTokenAddress, type EventTokenConversion, type EventTokenDefinition, type EventTokenGrantResponse, type EventTokenOperation, type EventTokenSpendResponse, EventTokenType, type ExecuteCloudCodeResponse, type ExecuteNodeResponse, type ExperimentDefinition, type ExperimentDefinitions, type ExperimentVariant, type ExperimentVariantCondition, type FodderConsumedEntry, FodderSelectionMode, FodderValuationMode, type FriendActionResponse, FriendActionStatus, type FriendPublicProfile, type FriendsListResponse, GameLoopAction, type GameLoopDefinitions, type GameLoopRequest, GameLoopService, type GetActiveBoostWindowsResponse, type GetActiveDealsResponse, type GetActiveEventsResponse, type GetActiveTimedBoostsResponse, type GetCharactersResponse, type GetLeaderboardResponse, type GetLeaderboardsBatchResponse, type GetMatchDefinitionsResponse, type GetMilestoneRewardMultiplierResponse, type GetMyProgressResponse, type GetMyUserCustomDataResponse, type GetOverviewBatchResponse, type GetProgressBatchResponse, type GetPublicTitleDataResponse, type GetPublicUserCustomDataResponse, type GetTradeOffersResponse, type GetUserQuestStateResponse, type GrantStatusTokensResponse, type GrantTokensBatchResponse, type GrantedCollectible, type HeistCell, IDosGamesClient, type IDosGamesClientConfig, IDosGamesData, type IDosGamesSettings, type IceServer, type InstantBattleDefinitions, type InstantBattleResponse, type InstantBattleRule, type InterstitialSettings, type InventoryDelta, ItemAction, type ItemCatalog, type ItemDefinition, type ItemDefinitions, type ItemEquipment, type ItemMetadata, type ItemRequest, ItemService, type ItemStats, type ItemTotals, type ItemUpgrade, type ItemUpgradeFodder, type ItemUpgradeRef, type JsonValue, KeyValueStorage, KycStatus, KycTier, LeaderboardAction, type LeaderboardDefinitions, type LeaderboardMilestoneRef, type LeaderboardOverview, type LeaderboardRequest, type LeaderboardScoreRef, LeaderboardService, type LeaderboardUserEntry, type LeaveRoomResponse, type LevelsPreset, type LimitSpec, type LinkedWalletInfo, type Listener, LootboxAction, type LootboxAmountRange, type LootboxDefinitions, type LootboxDefinitionsResponse, type LootboxOpenResponse, type LootboxPityRule, type LootboxPityTriggerResponse, type LootboxRequest, type LootboxRewardRoll, type LootboxRewardSlot, LootboxService, type LootboxSupplyRule, type MailboxBroadcastDocument, type MailboxDefinition, type MailboxMessageDocument, MailboxMessageSource, MailboxMessageStatus, type MailboxMessageTypeDefinition, type MailboxSegmentDefinition, MarketGoodsType, MarketOfferStatus, MarketOfferType, MarketplaceAction, type MarketplaceActionCounter, type MarketplaceAuctionSettings, type MarketplaceAuctionState, type MarketplaceBidRefund, type MarketplaceBrowseResponse, type MarketplaceBuyOrderSettings, type MarketplaceCommissionOverride, type MarketplaceCommissionPolicy, type MarketplaceCreateOfferResponse, type MarketplaceDefinitions, type MarketplaceDirectTradeSettings, type MarketplaceGetDefinitionsResponse, type MarketplaceGroupedOfferView, type MarketplaceGroupedOffersResponse, type MarketplaceHistoryEntryView, type MarketplaceHistoryResponse, type MarketplaceListingSettings, type MarketplaceMatchingSettings, type MarketplaceMyStateResponse, type MarketplaceOfferResponse, type MarketplaceOfferView, type MarketplacePlaceBidResponse, type MarketplacePricePolicy, type MarketplaceRequest, MarketplaceService, type MarketplaceSettlementResponse, type MarketplaceTradabilityPolicy, MatchAction, type MatchDefinitions, type MatchRequest, MatchService, MatchStatus, type MatchesPageResponse, type MilestoneClaimRef, type MilestoneDefinition, MultiplayerAction, MultiplayerChatMode, type MultiplayerDefinitions, type MultiplayerRequest, MultiplayerService, type MultiplayerSystemState, MultiplayerTopology, type NFTModel, type NFTNetworkBinding, type NFTTransactionDocument, type NFTWithdrawalResponse, type NftCollectionStats, type NftStatsContainer, type OpenCollectionChestResponse, type OpenPackResponse, type OperationFailure, type OperationFailureReason, type OperationResult, type OperationSuccess, type PendingWithdrawalRef, PlatformAdapter, type PlatformBlockchainState, type PlatformLoginResponse, type PlayerEconomyTuningState, type PollResponse, PremiumAction, type PremiumAdReduction, type PremiumDefinitions, type PremiumDefinitionsResponse, type PremiumPurchaseResponse, type PremiumRequest, PremiumService, type PremiumStateResponse, type PremiumSubscription, type PublishResponse, type PurchaseBatchResponse, type PvPMatch, QuestAction, type QuestAvailability, type QuestClaimRef, type QuestCycleDefinition, type QuestDefinition, type QuestDefinitions, type QuestGroupCompletionDefinition, type QuestIdentity, type QuestLinking, type QuestObjectiveDefinition, QuestObjectiveSource, type QuestPhaseDefinition, type QuestPointsTrackView, QuestPrerequisiteMode, type QuestPresetBindings, type QuestPresetRegistry, type QuestProgressUpdate, type QuestRequest, type QuestReward, QuestService, QuestStatus, RaidMode, type RaidResponse, type RealtimeEnvelope, type RechargeConfig, type RecordShowResponse, ReferralAction, type ReferralDefinitions, type ReferralDefinitionsResponse, type ReferralInviteRewardState, type ReferralRequest, ReferralService, type RelativeWindow, type ResourceBundle, type ResourceConsume, type ResourceDualPartyResult, type ResourceEntry, ResourceEntryType, type ResourceGrant, type ResourceOperation, type ResourceTransferResult, type RetryWithdrawalResponse, RewardAction, type RewardDefinitions, type RewardDefinitionsResponse, type RewardRequest, RewardService, type RewardedVideoSettings, type RollActionData, type RoomListItem, type RoomMemberView, type RoomSnapshotResponse, RoomVisibility, type RoomsPageResponse, type ScheduleChain, type ScheduleChainPhase, ScheduleMode, type ScheduleSpec, type ScheduledWindow, type SdkEvents, SeasonAction, type SeasonDefinitions, type SeasonRequest, SeasonService, type SeasonTierRewardBundle, type SeasonTierRewardMultiplier, type SeasonTierRewardSet, type SegmentGate, type SendTradeOfferResponse, type SetUserCustomDataResponse, type SettingsInput, SocialAction, type SocialRequest, SocialService, type SocialTimelineEvent, type SolanaWithdrawalSignature, type SpecialApplyMultiplierResponse, SpecialChoiceMode, type SpecialChooseResponse, type SpecialClaimResponse, type SpecialModeOfferData, type SpecialPendingState, type SpendRewardDefinition, type SpendTokensBatchResponse, type SsoCodeFromUrl, type StatDefinition, type StatRequirement, type StatsPreset, StoreAction, type StoreDefinitions, type StorePurchaseRef, type StorePurchaseResponse, type StorePurchaseState, type StoreRequest, StoreService, StoreType, type SubmitScoreResponse, type SubmitScoresBatchResponse, type SuccessResponse, TimedBoostAction, type TimedBoostDefinitions, type TimedBoostRequest, TimedBoostService, TimedBoostStackingPolicy, TimedEventAction, type TimedEventDefinitions, type TimedEventGrantRef, type TimedEventInstanceRef, type TimedEventMilestoneRef, type TimedEventRequest, TimedEventService, type TimedEventSpendRef, TimelineEventType, type TimelineResponse, TitleAction, TitleConfig, TitleCustomDataAction, type TitleCustomDataDefinitions, type TitleCustomDataKeyDefinition, type TitleCustomDataRecord, type TitleCustomDataRequest, TitleCustomDataService, TitleDataBucket, TitleDataScope, type TitlePublicConfigurationModel, type TitleRequest, TitleService, type TokenCurrencyStats, type TokenStatsContainer, type TokenTransactionDocument, type TokenWithdrawalResponse, TradeOfferStatus, TransactionDirection, type TransactionHistoryResponse, type TriggerContext, type TriggerSource, TypedEmitter, type UnequipAllCharactersResponse, type UnequipItemsResponse, type UnlockCharacterResponse, type UnlockCharactersBatchResponse, type UnstackableItemInstanceState, type Unsubscribe, type UpdateMatchResponse, type UpgradeCharacterLevelResponse, type UpgradeCharacterLevelsBatchResponse, type UpgradeItemLevelResponse, type UpgradeLevelsBatchResponse, type UpgradeLevelsOptions, type UpgradeStatLevelResponse, type UpgradeStatLevelsBatchResponse, type UsageReactivationEvent, type UsageTimeStats, type UseCollectibleJokerResponse, UserAction, type UserAdvertisingState, type UserBlockchainState, type UserBlockchainStateResponse, type UserCharactersState, type UserClaimRewardState, type UserCollectionState, type UserComebackState, type UserCommunityChestState, type UserCoopEventState, type UserCryptoComplianceCounters, type UserCryptoCurrencyState, UserCustomDataAction, type UserCustomDataBatchDeleteItem, type UserCustomDataBatchSetItem, type UserCustomDataDefinitions, type UserCustomDataKeyDefinition, type UserCustomDataRecord, type UserCustomDataRequest, UserCustomDataService, type UserCustomDataState, type UserDailyCalendarState, type UserDailyCounters, UserData, type UserDealNodeLifetimeCounts, type UserDealNodeState, type UserDealOfferActivationState, type UserDealOfferHistory, type UserDealOffersState, type UserDealOffersStateResponse, type UserDealSlotState, type UserDealTrackState, type UserDepositAddress, type UserEventTokenProgress, type UserEventTokensState, type UserGameLoopsState, type UserIdleAccrualState, type UserInventoryState, type UserKycState, type UserLeaderboardProgress, type UserLeaderboardsState, type UserLootboxPityCounter, type UserLootboxState, type UserMailboxState, type UserMarketplaceState, type UserMatchCreationLimitState, type UserMatchState, type UserPremiumState, type UserPublicDataModel, type UserQuestCycleState, type UserQuestObjectiveProgress, type UserQuestProgress, type UserQuestState, type UserReferralState, type UserReferralStateResponse, type UserRequest, type UserRewardState, type UserRewardsStateResponse, type UserSeasonState, type UserSeasonStateResponse, type UserSeasonsState, UserService, type UserSocialState, type UserState, type UserStateSlice, type UserStateVersions, type UserStoreState, type UserTimedBoostsState, type UserTimedEventStateResponse, type UserUsageState, type UserVirtualCurrencyState, type VirtualCurrencyDefinition, type VirtualCurrencyEconomy, type VirtualCurrencyPermissions, type WalletChallengeResponse, WalletLinkType, type WithdrawalSignatureResponse, type WithdrawalSplit, beginSsoRedirect, createIDosGamesClient, isFail, isOk, normalizeBlockchainCategory, readSsoCodeFromUrl };
5232
+ /** Что лежит в хранилище: версия таблицы и сама плоская таблица. */
5233
+ interface StoredLocalizationTable {
5234
+ v: number;
5235
+ t: Record<string, string>;
5236
+ }
5237
+ /**
5238
+ * Таблицы переводов, переживающие перезапуск игры.
5239
+ *
5240
+ * Механика та же, что у `TitleConfigCache`, с одним отличием: запись на ЛОКАЛЬ, а не на набор
5241
+ * полей. Иначе смена языка стирала бы предыдущий, и игрок, переключающийся туда-обратно,
5242
+ * перекачивал бы таблицы каждый раз.
5243
+ *
5244
+ * Переводы — публичные данные тайтла, одни и те же для всех игроков, поэтому при логауте они
5245
+ * намеренно НЕ удаляются: чистка только заставила бы качать заново.
5246
+ *
5247
+ * Любая ошибка хранилища трактуется как «кэша нет»: механизм обязан деградировать до полной
5248
+ * загрузки таблицы, а не ломать запуск игры.
5249
+ */
5250
+ declare class LocalizationCache {
5251
+ private readonly storage;
5252
+ private readonly titleId;
5253
+ constructor(storage: ConfigStorage, titleId: string);
5254
+ read(locale: string): Promise<StoredLocalizationTable | null>;
5255
+ write(locale: string, version: number, table: Record<string, string>): Promise<void>;
5256
+ /**
5257
+ * Версии ВСЕХ сохранённых таблиц одной картой — то, что уезжает в
5258
+ * `KnownLocalizationVersions`.
5259
+ *
5260
+ * Отдельная запись, а не обход ключей: интерфейс `ConfigStorage` намеренно узкий (get/set/
5261
+ * remove) и перечислять ключи не умеет — иначе его нельзя было бы реализовать поверх
5262
+ * PlayerPrefs или нативной обёртки.
5263
+ *
5264
+ * Карта нужна ДО того, как сервер ответит, какая локаль игроку досталась: прислать версию
5265
+ * только своего языка мало — на смене языка и у неполного перевода в дело идёт вторая
5266
+ * таблица, и её версию сервер тоже обязан сверить.
5267
+ */
5268
+ readVersions(): Promise<Record<string, number>>;
5269
+ private noteVersion;
5270
+ private keyOf;
5271
+ private versionsKey;
5272
+ }
5273
+
5274
+ export { type AcceptTradeOfferResponse, type ActivateReferralCodeResponse, type ActivateTimedBoostResponse, type ActiveBoostWindowInfo, type ActiveCoopEventInfo, type ActiveDealSlotInfo, type ActiveEventInfo, type ActiveSeasonInfo, type ActiveTimedBoost, type AdConsentSettings, type AdConsentState, type AdCreditsData, type AdDailyData, type AdFraudFlags, type AdFrequencyCappingSettings, type AdPendingRequest, type AdPlacementDefinition, type AdPlacementUserState, type AdProviderDefinition, type AdSessionData, AdType, type AdUnitConfig, type AdVerificationSettings, type AddQuestProgressResponse, type AdvertisingDefinitions, type AppOpenSettings, AttackOutcome, type AttackResponse, type AttributionInput, type AuthContext, AuthType, AuthenticationAction, type AuthenticationRequest, AuthenticationService, BannerPosition, type BannerSettings, type BaseRequest, type BatchDeleteUserCustomDataResponse, type BatchGetPublicUserCustomDataResponse, type BatchItemResult, type BatchResponse, type BatchSetUserCustomDataResponse, type BattleResult, type BattleStepConfig, type BlockchainAccountSafetyPolicy, BlockchainAction, type BlockchainConfigResponse, type BlockchainDefinitions, type BlockchainNetworkDefinition, BlockchainNetworkType, type BlockchainNftCollectionBinding, BlockchainOperationCategory, type BlockchainRequest, BlockchainService, type BlockchainStats, type BlockchainSystemState, BlockchainTransactionStatus, BlockchainTransactionType, type BoardLoopDefinition, type BoardLoopState, type BoardPendingInteraction, type BoardRollResponse, BodyPart, type BoostTriggerCounter, BoostWindowKind, BroadcastStatus, type BuildResponse, type BuildingState, type CancelMatchResponse, type CancelTradeOfferResponse, type ChangeUsernameResponse, CharacterAction, type CharacterClassification, type CharacterDefinition, type CharacterDefinitions, type CharacterEquipment, type CharacterEquipmentSlot, type CharacterIdentity, type CharacterLevelDefinition, type CharacterLevelRef, type CharacterModel, type CharacterRequest, CharacterService, type CharacterStatRef, type CharacterUnequipResult, type CharacterUnlock, type ClaimAllRewardsBatchResponse, type ClaimAllRewardsResult, type ClaimComebackRewardResponse, type ClaimCycleRewardResponse, type ClaimCycleRewardsBatchResponse, type ClaimDailyRewardResponse, type ClaimDealMilestoneResponse, type ClaimDealMilestonesBatchResponse, type ClaimGrandPrizeResponse, type ClaimGroupCompletionRewardResponse, type ClaimInviteRewardResponse, type ClaimInviteRewardsBatchResponse, type ClaimLeaderboardMilestoneResponse, type ClaimLeaderboardMilestonesBatchResponse, type ClaimMilestoneRewardResponse, type ClaimMilestoneRewardsBatchResponse, type ClaimMilestonesBatchResponse, type ClaimQuestRewardResponse, type ClaimQuestRewardsBatchResponse, type ClaimRewardResponse, type ClaimSetRewardResponse, type ClaimSetRewardsBatchResponse, type ClaimTierRewardResponse, type ClaimTierRewardsBatchResponse, type ClientState, CloudCodeAction, CloudCodeErrorCode, type CloudCodeLogEntry, CloudCodeLogLevel, type CloudCodeRequest, CloudCodeRevisionSelection, CloudCodeService, type CodeExecutionError, type CollectIdleAccrualResponse, CollectionAction, type CollectionDefinitions, type CollectionGlobalSettings, type CollectionRequest, CollectionService, type CollectionSetRef, type CollectionTradeOfferDocument, CommissionSink, type CommunityChestClaimResponse, type CommunityChestGroupDocument, type CommunityChestGroupStateResponse, type CommunityChestHistoryEntry, type CommunityChestLeaveResponse, type CommunityChestMember, CommunityChestMemberStatus, type CommunityChestSharedState, CommunityChestStatus, type CommunityChestUserStateResponse, type ConfirmWithdrawalResponse, type ConversionDailyCounter, ConversionRateMode, type ConversionTarget, type ConvertResponse, type CoopBuildObjectsMemberState, type CoopBuildObjectsState, type CoopClaimRewardResponse, CoopEventAction, type CoopEventDefinitions, type CoopEventRequest, CoopEventService, type CoopGroupDocument, type CoopGroupMember, type CoopGroupStateResponse, CoopGroupStatus, type CoopLeaveGroupResponse, CoopMemberStatus, type CoopPartnerObjectState, type CoopSpinResponse, type CoopUserStateResponse, CraftAction, type CraftDefinitions, type CraftDefinitionsResponse, type CraftRequest, type CraftResponse, CraftService, type CraftSingleResult, CraftType, type CreateMatchResponse, type CryptoConvertResponse, type CryptoCurrencyDefinition, type CryptoCurrencyPermissions, type CryptoLimits, type CryptoNetworkBinding, CurrencyAction, type CurrencyAudit, type CurrencyConversion, type CurrencyDefinitions, type CurrencyRequest, CurrencyService, CurrencyStatus, CurrencyType, CustomDataBucket, CustomDataValueType, CustomDataWriter, type CyclicSchedule, DEFAULT_BASE_URL, type DailyUsageRecord, type DealMilestoneProgressInfo, DealNodeRuntimeStatus, DealOfferAction, DealOfferActivationStatus, type DealOfferDefinitions, type DealOfferRequest, DealOfferService, type DealOffersDefinitionResponse, type DeclineTradeOfferResponse, type DepositNFTResponse, type DepositTokenResponse, type DismissDealResponse, type DonationResponse, EnvelopeType, type EquipItemsResponse, type EquipSlotPair, type EquipmentPreset, type EquipmentSlot, type EquippedItem, type EventMap, type EventMilestoneClaimResponse, type EventTokenAddress, type EventTokenConversion, type EventTokenDefinition, type EventTokenGrantResponse, type EventTokenOperation, type EventTokenSpendResponse, EventTokenType, type ExecuteCloudCodeResponse, type ExecuteNodeResponse, type ExperimentDefinition, type ExperimentDefinitions, type ExperimentVariant, type ExperimentVariantCondition, type FodderConsumedEntry, FodderSelectionMode, FodderValuationMode, type FriendActionResponse, FriendActionStatus, type FriendPublicProfile, type FriendsListResponse, GameLoopAction, type GameLoopDefinitions, type GameLoopRequest, GameLoopService, type GetActiveBoostWindowsResponse, type GetActiveDealsResponse, type GetActiveEventsResponse, type GetActiveTimedBoostsResponse, type GetCharactersResponse, type GetLeaderboardResponse, type GetLeaderboardsBatchResponse, type GetMatchDefinitionsResponse, type GetMilestoneRewardMultiplierResponse, type GetMyProgressResponse, type GetMyUserCustomDataResponse, type GetOverviewBatchResponse, type GetProgressBatchResponse, type GetPublicTitleDataResponse, type GetPublicUserCustomDataResponse, type GetTradeOffersResponse, type GetUserQuestStateResponse, type GetUserTutorialStateResponse, type GrantStatusTokensResponse, type GrantTokensBatchResponse, type GrantedCollectible, type HeistCell, IDosGamesClient, type IDosGamesClientConfig, IDosGamesData, type IDosGamesSettings, type IceServer, type InstantBattleDefinitions, type InstantBattleResponse, type InstantBattleRule, type InterstitialSettings, type InventoryDelta, ItemAction, type ItemCatalog, type ItemDefinition, type ItemDefinitions, type ItemEquipment, type ItemMetadata, type ItemRequest, ItemService, type ItemStats, type ItemTotals, type ItemUpgrade, type ItemUpgradeFodder, type ItemUpgradeRef, type JsonValue, KeyValueStorage, KycStatus, KycTier, LeaderboardAction, type LeaderboardDefinitions, type LeaderboardMilestoneRef, type LeaderboardOverview, type LeaderboardRequest, type LeaderboardScoreRef, LeaderboardService, type LeaderboardUserEntry, type LeaveRoomResponse, type LevelsPreset, type LimitSpec, type LinkedWalletInfo, type Listener, LocalizationAction, LocalizationCache, type LocalizationDefinitions, type LocalizationLocaleDefinition, type LocalizationLocaleInfo, type LocalizationManifestResponse, LocalizationMissingKeyMode, type LocalizationParams, type LocalizationRequest, LocalizationService, type LocalizationState, type LocalizationTableRef, type LocalizationTableResponse, LootboxAction, type LootboxAmountRange, type LootboxDefinitions, type LootboxDefinitionsResponse, type LootboxGlobalSettings, type LootboxOpenResponse, type LootboxPityRule, type LootboxPityTriggerResponse, type LootboxRequest, type LootboxRewardRoll, type LootboxRewardSlot, LootboxService, type LootboxSupplyRule, type MailboxBroadcastDocument, type MailboxDefinition, type MailboxMessageDocument, MailboxMessageSource, MailboxMessageStatus, type MailboxMessageTypeDefinition, type MailboxSegmentDefinition, MarketGoodsType, MarketOfferStatus, MarketOfferType, MarketplaceAction, type MarketplaceActionCounter, type MarketplaceAuctionSettings, type MarketplaceAuctionState, type MarketplaceBidRefund, type MarketplaceBrowseResponse, type MarketplaceBuyOrderSettings, type MarketplaceCommissionOverride, type MarketplaceCommissionPolicy, type MarketplaceCreateOfferResponse, type MarketplaceDefinitions, type MarketplaceDirectTradeSettings, type MarketplaceGetDefinitionsResponse, type MarketplaceGroupedOfferView, type MarketplaceGroupedOffersResponse, type MarketplaceHistoryEntryView, type MarketplaceHistoryResponse, type MarketplaceListingSettings, type MarketplaceMatchingSettings, type MarketplaceMyStateResponse, type MarketplaceOfferResponse, type MarketplaceOfferView, type MarketplacePlaceBidResponse, type MarketplacePricePolicy, type MarketplaceRequest, MarketplaceService, type MarketplaceSettlementResponse, type MarketplaceTradabilityPolicy, MatchAction, type MatchDefinitions, type MatchRequest, MatchService, MatchStatus, type MatchesPageResponse, type MilestoneClaimRef, type MilestoneDefinition, MultiplayerAction, MultiplayerChatMode, type MultiplayerDefinitions, type MultiplayerRequest, MultiplayerService, type MultiplayerSystemState, MultiplayerTopology, type NFTModel, type NFTNetworkBinding, type NFTTransactionDocument, type NFTWithdrawalResponse, type NftCollectionStats, type NftStatsContainer, type OpenCollectionChestResponse, type OpenPackResponse, type OperationFailure, type OperationFailureReason, type OperationResult, type OperationSuccess, type PackOpenResult, type PendingWithdrawalRef, PlatformAdapter, type PlatformBlockchainState, type PlatformLoginResponse, type PlayerEconomyTuningState, type PollResponse, PremiumAction, type PremiumAdReduction, type PremiumDefinitions, type PremiumDefinitionsResponse, type PremiumPurchaseResponse, type PremiumRequest, PremiumService, type PremiumStateResponse, type PremiumSubscription, type PublishResponse, type PurchaseBatchResponse, type PvPMatch, QuestAction, type QuestAvailability, type QuestClaimRef, type QuestCycleDefinition, type QuestDefinition, type QuestDefinitions, type QuestGroupCompletionDefinition, type QuestIdentity, type QuestLinking, type QuestObjectiveDefinition, QuestObjectiveSource, type QuestPhaseDefinition, type QuestPointsTrackView, QuestPrerequisiteMode, type QuestPresetBindings, type QuestPresetRegistry, type QuestProgressUpdate, type QuestRequest, type QuestReward, QuestService, QuestStatus, RaidMode, type RaidResponse, type RealtimeEnvelope, type RechargeConfig, type RecordShowResponse, ReferralAction, type ReferralDefinitions, type ReferralDefinitionsResponse, type ReferralInviteRewardState, type ReferralRequest, ReferralService, type RelativeWindow, type ResourceBundle, type ResourceConsume, type ResourceDualPartyResult, type ResourceEntry, ResourceEntryType, type ResourceGrant, type ResourceOperation, type ResourceTransferResult, type RetryWithdrawalResponse, RewardAction, type RewardDefinitions, type RewardDefinitionsResponse, type RewardRequest, RewardService, type RewardedVideoSettings, type RollActionData, type RoomListItem, type RoomMemberView, type RoomSnapshotResponse, RoomVisibility, type RoomsPageResponse, type ScheduleChain, type ScheduleChainPhase, ScheduleMode, type ScheduleSpec, type ScheduledWindow, type SdkEvents, SeasonAction, type SeasonDefinitions, type SeasonRequest, SeasonService, type SeasonTierRewardBundle, type SeasonTierRewardMultiplier, type SeasonTierRewardSet, type SegmentGate, type SendTradeOfferResponse, type SetUserCustomDataResponse, type SettingsInput, SocialAction, type SocialCounters, type SocialRequest, SocialService, type SocialTimelineEvent, type SolanaWithdrawalSignature, type SpecialApplyMultiplierResponse, SpecialChoiceMode, type SpecialChooseResponse, type SpecialClaimResponse, type SpecialModeOfferData, type SpecialPendingState, type SpendRewardDefinition, type SpendTokensBatchResponse, type SsoCodeFromUrl, type StatDefinition, type StatRequirement, type StatsPreset, StoreAction, type StoreDefinitions, type StorePurchaseRef, type StorePurchaseResponse, type StorePurchaseState, type StoreRequest, StoreService, StoreType, type StoredLocalizationTable, type SubmitScoreResponse, type SubmitScoresBatchResponse, type SuccessResponse, TimedBoostAction, type TimedBoostDefinitions, type TimedBoostRequest, TimedBoostService, TimedBoostStackingPolicy, TimedEventAction, type TimedEventDefinitions, type TimedEventGrantRef, type TimedEventInstanceRef, type TimedEventMilestoneRef, type TimedEventRequest, TimedEventService, type TimedEventSpendRef, TimelineEventType, type TimelineResponse, TitleAction, TitleConfig, TitleCustomDataAction, type TitleCustomDataDefinitions, type TitleCustomDataKeyDefinition, type TitleCustomDataRecord, type TitleCustomDataRequest, TitleCustomDataService, TitleDataBucket, TitleDataScope, type TitlePublicConfigurationModel, type TitleRequest, TitleService, type TokenCurrencyStats, type TokenStatsContainer, type TokenTransactionDocument, type TokenWithdrawalResponse, TradeOfferStatus, TransactionDirection, type TransactionHistoryResponse, type TriggerContext, type TriggerSource, TutorialAction, type TutorialAvailability, type TutorialBlockingPolicy, TutorialBoardAction, type TutorialBoardScript, type TutorialClaimResponse, type TutorialDefinitions, type TutorialFlowBatchResponse, type TutorialFlowDefinition, type TutorialFlowPolicy, type TutorialFlowResponse, TutorialFlowStatus, type TutorialFlowView, type TutorialGateCondition, TutorialGateMode, type TutorialGlobalSettings, type TutorialIdentity, type TutorialPresetBindings, type TutorialPresetRegistry, type TutorialRequest, TutorialRestartPolicy, type TutorialReward, TutorialScriptModule, type TutorialScriptedOutcome, type TutorialStepCompletion, TutorialStepCompletionMode, type TutorialStepDefinition, type TutorialStepEffects, type TutorialStepIdentity, type TutorialStepPolicy, type TutorialStepProgress, TypedEmitter, type UnequipAllCharactersResponse, type UnequipItemsResponse, type UnlockCharacterResponse, type UnlockCharactersBatchResponse, type UnstackableItemInstanceState, type Unsubscribe, type UpdateMatchResponse, type UpgradeCharacterLevelResponse, type UpgradeCharacterLevelsBatchResponse, type UpgradeItemLevelResponse, type UpgradeLevelsBatchResponse, type UpgradeLevelsOptions, type UpgradeStatLevelResponse, type UpgradeStatLevelsBatchResponse, type UsageReactivationEvent, type UsageTimeStats, type UseCollectibleJokerResponse, UserAction, type UserAdvertisingState, type UserBlockchainState, type UserBlockchainStateResponse, type UserCharactersState, type UserClaimRewardState, type UserCollectionState, type UserComebackState, type UserCommunityChestState, type UserCoopEventState, type UserCryptoComplianceCounters, type UserCryptoCurrencyState, UserCustomDataAction, type UserCustomDataBatchDeleteItem, type UserCustomDataBatchSetItem, type UserCustomDataDefinitions, type UserCustomDataKeyDefinition, type UserCustomDataRecord, type UserCustomDataRequest, UserCustomDataService, type UserCustomDataState, type UserDailyCalendarState, type UserDailyCounters, UserData, type UserDealNodeLifetimeCounts, type UserDealNodeState, type UserDealOfferActivationState, type UserDealOfferHistory, type UserDealOffersState, type UserDealOffersStateResponse, type UserDealSlotState, type UserDealTrackState, type UserDepositAddress, type UserEventTokenProgress, type UserEventTokensState, type UserGameLoopsState, type UserIdleAccrualState, type UserInventoryState, type UserKycState, type UserLeaderboardProgress, type UserLeaderboardsState, type UserLootboxPityCounter, type UserLootboxState, type UserMailboxState, type UserMarketplaceState, type UserMatchCreationLimitState, type UserMatchState, type UserPremiumState, type UserPublicDataModel, type UserQuestCycleState, type UserQuestObjectiveProgress, type UserQuestProgress, type UserQuestState, type UserReferralState, type UserReferralStateResponse, type UserRequest, type UserRewardState, type UserRewardsStateResponse, type UserSeasonState, type UserSeasonStateResponse, type UserSeasonsState, UserService, type UserSocialState, type UserState, type UserStateSlice, type UserStateVersions, type UserStoreState, type UserTimedBoostsState, type UserTimedEventStateResponse, type UserTutorialFlowState, type UserTutorialState, type UserTutorialStepState, type UserUsageState, type UserVirtualCurrencyState, type VirtualCurrencyDefinition, type VirtualCurrencyEconomy, type VirtualCurrencyPermissions, type WalletChallengeResponse, WalletLinkType, type WithdrawalSignatureResponse, type WithdrawalSplit, beginSsoRedirect, createIDosGamesClient, isFail, isOk, normalizeBlockchainCategory, readSsoCodeFromUrl };