@idosgames/core 0.26.3 → 0.26.5

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.
@@ -4837,7 +4837,7 @@ declare const WorkshopAction: {
4837
4837
  readonly GetMyFavorites: "GetMyFavorites";
4838
4838
  };
4839
4839
  type WorkshopAction = (typeof WorkshopAction)[keyof typeof WorkshopAction];
4840
- type PlatformLoginResponse = { TitleUserID: string; TitleClientSessionTicket: string; TitleClientSessionTicketExpiration: string; PlatformUserID?: null | string; PlatformAuthToken?: null | string; PlatformAuthTokenExpiration?: null | string; PlayAccess?: null | PlayAccessStatus; RefreshToken?: null | string; RefreshTokenExpiration?: null | string; };
4840
+ type PlatformLoginResponse = { TitleUserID: string; TitleClientSessionTicket: string; TitleClientSessionTicketExpiration: string; PlatformUserID?: null | string; PlatformAuthToken?: null | string; PlatformAuthTokenExpiration?: null | string; PlayAccess?: null | PlayAccessStatus; RefreshToken?: null | string; RefreshTokenExpiration?: null | string; ClientState?: null | ClientState; };
4841
4841
  type RefreshSessionResponse = { TitleUserID: string; TitleClientSessionTicket: string; TitleClientSessionTicketExpiration: string; RefreshToken: string; RefreshTokenExpiration?: null | string; PlayAccess?: null | PlayAccessStatus; };
4842
4842
  type AuthOptionsResponse = { Google?: null | { Enabled?: null | boolean; WebClientID?: null | string; PlatformFallback?: null | boolean; AndroidClientID?: null | string; IosClientID?: null | string; DesktopClientID?: null | string; [key: string]: unknown; }; Apple?: null | { Enabled?: null | boolean; BundleID?: null | string; ServiceID?: null | string; [key: string]: unknown; }; PlayAccessMode?: null | 'Open' | 'AnyWithLinkedWallet' | 'WalletOnly'; WalletLoginNetworks?: null | Array<{ NetworkID?: null | string; Type?: null | string; [key: string]: unknown; }>; ShowWalletLogin?: null | boolean; NativeSso?: null | { ReturnMode?: null | string; UrlScheme?: null | string; UserCodeSupported?: null | boolean; PollIntervalSeconds?: null | number; [key: string]: unknown; }; [key: string]: unknown; };
4843
4843
  type WalletLinkResponse = { Linked?: null | boolean; Challenge?: null | string; ExpiresAt?: null | string; NetworkID?: null | string; Address?: null | string; PlayAccess?: null | PlayAccessStatus; [key: string]: unknown; };
@@ -4886,6 +4886,11 @@ interface AuthenticationRequest extends BaseRequest {
4886
4886
  SsoCode?: string;
4887
4887
  /** Game ticket of the iDos Games app's shared game session. See `AuthenticationAction.ResolvePlatformGameSession`. */
4888
4888
  PlatformGameTicket?: string;
4889
+ /**
4890
+ * Body of `User/GetClientStateExcept` the login runs right after itself and returns in
4891
+ * `PlatformLoginResponse.ClientState`. Read by `ResolvePlatformGameSession` only.
4892
+ */
4893
+ ClientState?: UserRequest;
4889
4894
  PlatformRefreshToken?: string;
4890
4895
  GoogleIDToken?: string;
4891
4896
  /** Sign in with Apple: the identity token Apple returned (web: `authorization.id_token`). */
@@ -5295,7 +5300,7 @@ type AIPublicTemplateVariable = { Name?: null | string; Type?: null | string; Re
5295
5300
  type AIPublicSetting = { Key: string; Kind?: null | string; Name?: null | Record<string, string>; Hint?: null | Record<string, string>; Unit?: null | Record<string, string>; Choices?: null | Array<{ Value: string; Name?: null | Record<string, string>; Group?: null | string; [key: string]: unknown; }>; Groups?: null | Array<{ Key: string; Name?: null | Record<string, string>; [key: string]: unknown; }>; Default?: null | string; Min?: null | number; Max?: null | number; Step?: null | number; [key: string]: unknown; };
5296
5301
  type AITemplatePrice = { PriceOptions?: null | PriceOptions; [key: string]: unknown; };
5297
5302
  type AIPublicTemplate = { Id?: null | string; Kind?: null | string; Action?: null | string; IsTrend?: null | boolean; Category?: null | string; Order?: null | number; Name?: null | Record<string, string>; Description?: null | Record<string, string>; Preview?: null | { Url?: null | string; PosterUrl?: null | string; Type?: null | string; [key: string]: unknown; }; Inputs?: null | Array<AIPublicTemplateInput>; Variables?: null | Array<AIPublicTemplateVariable>; Settings?: null | Array<AIPublicSetting>; [key: string]: unknown; };
5298
- type AIPublicFeature = { Modality?: null | 'Text' | 'Image' | 'Video' | 'Audio' | 'Music' | 'ThreeD'; Async?: null | boolean; Limits?: null | LimitSpec; PriceOptions?: null | PriceOptions; Tags?: null | Array<string>; HistoryMessages?: null | number; MaxTokens?: null | number; AllowImages?: null | boolean; MaxInputImages?: null | number; MaxInputImageBytes?: null | number; AllowedImageTypes?: null | Array<string>; MaxImages?: null | number; AllowEdit?: null | boolean; AllowReferenceImage?: null | boolean; MaxPromptChars?: null | number; LockBehavior?: null | boolean; ImageSize?: null | string; VideoSize?: null | string; VideoSeconds?: null | number; Voice?: null | string; AudioFormat?: null | string; MusicFormat?: null | string; ThreeDOperation?: null | string; ThreeDAnimations?: null | Array<string>; Reward?: null | ResourceGrant; PromptVariables?: null | Array<{ Name?: null | string; Type?: null | string; Required?: null | boolean; MaxLength?: null | number; Enum?: null | Array<string>; [key: string]: unknown; }>; AllowFreePrompt?: null | boolean; PlatformTemplateId?: null | string; PlatformTemplate?: null | AIPublicTemplate; FreePerDay?: null | number; FreeLeftToday?: null | number; [key: string]: unknown; };
5303
+ type AIPublicFeature = { Modality?: null | 'Text' | 'Image' | 'Video' | 'Audio' | 'Music' | 'ThreeD'; Async?: null | boolean; Limits?: null | LimitSpec; PriceOptions?: null | PriceOptions; Tags?: null | Array<string>; HistoryMessages?: null | number; MaxTokens?: null | number; AllowImages?: null | boolean; MaxInputImages?: null | number; MaxInputImageBytes?: null | number; AllowedImageTypes?: null | Array<string>; MaxImages?: null | number; AllowEdit?: null | boolean; AllowReferenceImage?: null | boolean; MaxPromptChars?: null | number; LockBehavior?: null | boolean; ImageSize?: null | string; VideoSize?: null | string; VideoSeconds?: null | number; Voice?: null | string; AudioFormat?: null | string; MusicFormat?: null | string; ThreeDOperation?: null | string; ThreeDAnimations?: null | Array<string>; Reward?: null | ResourceGrant; PromptVariables?: null | Array<{ Name?: null | string; Type?: null | string; Required?: null | boolean; MaxLength?: null | number; Enum?: null | Array<string>; [key: string]: unknown; }>; AllowFreePrompt?: null | boolean; PlatformTemplateId?: null | string; PlatformTemplate?: null | AIPublicTemplate; Settings?: null | Array<AIPublicSetting>; FreePerDay?: null | number; FreeLeftToday?: null | number; [key: string]: unknown; };
5299
5304
  /** The title's AI features, returned by `getDefinitions()`. */
5300
5305
  interface AIPublicDefinitions {
5301
5306
  /** Master switch. `false` = every generate request fails. */
@@ -6414,6 +6419,18 @@ declare class UserService {
6414
6419
  * refresh doesn't wipe the active board.
6415
6420
  */
6416
6421
  getClientStateExcept(excludeFields?: string[], excludeTitleFields?: string[]): Promise<OperationResult<ClientState>>;
6422
+ /**
6423
+ * Тело `GetClientStateExcept` ДО входа: его выполняет сам вход (`AuthenticationRequest.ClientState`,
6424
+ * пока только `ResolvePlatformGameSession`) — один запрос вместо двух на каждом свайпе ленты приложения
6425
+ * (11.11.2026). Игрок до входа неизвестен, поэтому версий контейнеров нет: сервер отдаёт состояние
6426
+ * целиком. `UserID`/тикета в теле нет, их даёт вход. Ответ — `finish` с `PlatformLoginResponse.ClientState`.
6427
+ */
6428
+ prepareLoginClientState(excludeFields?: string[], excludeTitleFields?: string[]): Promise<{
6429
+ request: UserRequest;
6430
+ finish: (data: ClientState) => Promise<OperationResult<ClientState>>;
6431
+ }>;
6432
+ private prepareClientStateExcept;
6433
+ private finishClientStateExcept;
6417
6434
  /**
6418
6435
  * Секции, которых нет в клиентской проекции конфига, но которые система дочитала своим
6419
6436
  * `GetDefinitions` (бусты, рынок, PvP, ИИ): поднимаются из хранилища, если конфиг с тех пор не
@@ -7777,8 +7794,8 @@ interface AIGenerateOptions {
7777
7794
  */
7778
7795
  variables?: Record<string, string>;
7779
7796
  /**
7780
- * Template features only: the generation settings the player picked (`AIPublicTemplate.Settings`, key → value). The
7781
- * price follows them, see {@link AIService.estimateTemplatePrice}. Send the same values when you repeat the call
7797
+ * The generation settings the player picked, key → value: `AIPublicTemplate.Settings` on a template feature,
7798
+ * `AIPublicFeature.Settings` on a feature without one. The price follows them, see {@link AIService.estimateTemplatePrice}. Send the same values when you repeat the call
7782
7799
  * with `creditsConfirmationID`: the confirmed price is for these settings.
7783
7800
  */
7784
7801
  params?: Record<string, string>;
@@ -7873,7 +7890,8 @@ declare class AIService {
7873
7890
  */
7874
7891
  generateFromTemplate(featureKey: string, files?: Record<string, AIInputImage>, options?: AIGenerateOptions): Promise<OperationResult<AIGenerationView>>;
7875
7892
  /**
7876
- * The price of a template feature for the player's settings: the feature's price options, each scaled by how much
7893
+ * The price of a feature for the player's settings (a template feature, or a feature without a template that has
7894
+ * `Settings`): the feature's price options, each scaled by how much
7877
7895
  * these settings cost against the author's (the markup is kept). Charges nothing; files are not needed. An option
7878
7896
  * that cannot pay for this choice (a store purchase when the choice costs more) is left out.
7879
7897
  */
@@ -4837,7 +4837,7 @@ declare const WorkshopAction: {
4837
4837
  readonly GetMyFavorites: "GetMyFavorites";
4838
4838
  };
4839
4839
  type WorkshopAction = (typeof WorkshopAction)[keyof typeof WorkshopAction];
4840
- type PlatformLoginResponse = { TitleUserID: string; TitleClientSessionTicket: string; TitleClientSessionTicketExpiration: string; PlatformUserID?: null | string; PlatformAuthToken?: null | string; PlatformAuthTokenExpiration?: null | string; PlayAccess?: null | PlayAccessStatus; RefreshToken?: null | string; RefreshTokenExpiration?: null | string; };
4840
+ type PlatformLoginResponse = { TitleUserID: string; TitleClientSessionTicket: string; TitleClientSessionTicketExpiration: string; PlatformUserID?: null | string; PlatformAuthToken?: null | string; PlatformAuthTokenExpiration?: null | string; PlayAccess?: null | PlayAccessStatus; RefreshToken?: null | string; RefreshTokenExpiration?: null | string; ClientState?: null | ClientState; };
4841
4841
  type RefreshSessionResponse = { TitleUserID: string; TitleClientSessionTicket: string; TitleClientSessionTicketExpiration: string; RefreshToken: string; RefreshTokenExpiration?: null | string; PlayAccess?: null | PlayAccessStatus; };
4842
4842
  type AuthOptionsResponse = { Google?: null | { Enabled?: null | boolean; WebClientID?: null | string; PlatformFallback?: null | boolean; AndroidClientID?: null | string; IosClientID?: null | string; DesktopClientID?: null | string; [key: string]: unknown; }; Apple?: null | { Enabled?: null | boolean; BundleID?: null | string; ServiceID?: null | string; [key: string]: unknown; }; PlayAccessMode?: null | 'Open' | 'AnyWithLinkedWallet' | 'WalletOnly'; WalletLoginNetworks?: null | Array<{ NetworkID?: null | string; Type?: null | string; [key: string]: unknown; }>; ShowWalletLogin?: null | boolean; NativeSso?: null | { ReturnMode?: null | string; UrlScheme?: null | string; UserCodeSupported?: null | boolean; PollIntervalSeconds?: null | number; [key: string]: unknown; }; [key: string]: unknown; };
4843
4843
  type WalletLinkResponse = { Linked?: null | boolean; Challenge?: null | string; ExpiresAt?: null | string; NetworkID?: null | string; Address?: null | string; PlayAccess?: null | PlayAccessStatus; [key: string]: unknown; };
@@ -4886,6 +4886,11 @@ interface AuthenticationRequest extends BaseRequest {
4886
4886
  SsoCode?: string;
4887
4887
  /** Game ticket of the iDos Games app's shared game session. See `AuthenticationAction.ResolvePlatformGameSession`. */
4888
4888
  PlatformGameTicket?: string;
4889
+ /**
4890
+ * Body of `User/GetClientStateExcept` the login runs right after itself and returns in
4891
+ * `PlatformLoginResponse.ClientState`. Read by `ResolvePlatformGameSession` only.
4892
+ */
4893
+ ClientState?: UserRequest;
4889
4894
  PlatformRefreshToken?: string;
4890
4895
  GoogleIDToken?: string;
4891
4896
  /** Sign in with Apple: the identity token Apple returned (web: `authorization.id_token`). */
@@ -5295,7 +5300,7 @@ type AIPublicTemplateVariable = { Name?: null | string; Type?: null | string; Re
5295
5300
  type AIPublicSetting = { Key: string; Kind?: null | string; Name?: null | Record<string, string>; Hint?: null | Record<string, string>; Unit?: null | Record<string, string>; Choices?: null | Array<{ Value: string; Name?: null | Record<string, string>; Group?: null | string; [key: string]: unknown; }>; Groups?: null | Array<{ Key: string; Name?: null | Record<string, string>; [key: string]: unknown; }>; Default?: null | string; Min?: null | number; Max?: null | number; Step?: null | number; [key: string]: unknown; };
5296
5301
  type AITemplatePrice = { PriceOptions?: null | PriceOptions; [key: string]: unknown; };
5297
5302
  type AIPublicTemplate = { Id?: null | string; Kind?: null | string; Action?: null | string; IsTrend?: null | boolean; Category?: null | string; Order?: null | number; Name?: null | Record<string, string>; Description?: null | Record<string, string>; Preview?: null | { Url?: null | string; PosterUrl?: null | string; Type?: null | string; [key: string]: unknown; }; Inputs?: null | Array<AIPublicTemplateInput>; Variables?: null | Array<AIPublicTemplateVariable>; Settings?: null | Array<AIPublicSetting>; [key: string]: unknown; };
5298
- type AIPublicFeature = { Modality?: null | 'Text' | 'Image' | 'Video' | 'Audio' | 'Music' | 'ThreeD'; Async?: null | boolean; Limits?: null | LimitSpec; PriceOptions?: null | PriceOptions; Tags?: null | Array<string>; HistoryMessages?: null | number; MaxTokens?: null | number; AllowImages?: null | boolean; MaxInputImages?: null | number; MaxInputImageBytes?: null | number; AllowedImageTypes?: null | Array<string>; MaxImages?: null | number; AllowEdit?: null | boolean; AllowReferenceImage?: null | boolean; MaxPromptChars?: null | number; LockBehavior?: null | boolean; ImageSize?: null | string; VideoSize?: null | string; VideoSeconds?: null | number; Voice?: null | string; AudioFormat?: null | string; MusicFormat?: null | string; ThreeDOperation?: null | string; ThreeDAnimations?: null | Array<string>; Reward?: null | ResourceGrant; PromptVariables?: null | Array<{ Name?: null | string; Type?: null | string; Required?: null | boolean; MaxLength?: null | number; Enum?: null | Array<string>; [key: string]: unknown; }>; AllowFreePrompt?: null | boolean; PlatformTemplateId?: null | string; PlatformTemplate?: null | AIPublicTemplate; FreePerDay?: null | number; FreeLeftToday?: null | number; [key: string]: unknown; };
5303
+ type AIPublicFeature = { Modality?: null | 'Text' | 'Image' | 'Video' | 'Audio' | 'Music' | 'ThreeD'; Async?: null | boolean; Limits?: null | LimitSpec; PriceOptions?: null | PriceOptions; Tags?: null | Array<string>; HistoryMessages?: null | number; MaxTokens?: null | number; AllowImages?: null | boolean; MaxInputImages?: null | number; MaxInputImageBytes?: null | number; AllowedImageTypes?: null | Array<string>; MaxImages?: null | number; AllowEdit?: null | boolean; AllowReferenceImage?: null | boolean; MaxPromptChars?: null | number; LockBehavior?: null | boolean; ImageSize?: null | string; VideoSize?: null | string; VideoSeconds?: null | number; Voice?: null | string; AudioFormat?: null | string; MusicFormat?: null | string; ThreeDOperation?: null | string; ThreeDAnimations?: null | Array<string>; Reward?: null | ResourceGrant; PromptVariables?: null | Array<{ Name?: null | string; Type?: null | string; Required?: null | boolean; MaxLength?: null | number; Enum?: null | Array<string>; [key: string]: unknown; }>; AllowFreePrompt?: null | boolean; PlatformTemplateId?: null | string; PlatformTemplate?: null | AIPublicTemplate; Settings?: null | Array<AIPublicSetting>; FreePerDay?: null | number; FreeLeftToday?: null | number; [key: string]: unknown; };
5299
5304
  /** The title's AI features, returned by `getDefinitions()`. */
5300
5305
  interface AIPublicDefinitions {
5301
5306
  /** Master switch. `false` = every generate request fails. */
@@ -6414,6 +6419,18 @@ declare class UserService {
6414
6419
  * refresh doesn't wipe the active board.
6415
6420
  */
6416
6421
  getClientStateExcept(excludeFields?: string[], excludeTitleFields?: string[]): Promise<OperationResult<ClientState>>;
6422
+ /**
6423
+ * Тело `GetClientStateExcept` ДО входа: его выполняет сам вход (`AuthenticationRequest.ClientState`,
6424
+ * пока только `ResolvePlatformGameSession`) — один запрос вместо двух на каждом свайпе ленты приложения
6425
+ * (11.11.2026). Игрок до входа неизвестен, поэтому версий контейнеров нет: сервер отдаёт состояние
6426
+ * целиком. `UserID`/тикета в теле нет, их даёт вход. Ответ — `finish` с `PlatformLoginResponse.ClientState`.
6427
+ */
6428
+ prepareLoginClientState(excludeFields?: string[], excludeTitleFields?: string[]): Promise<{
6429
+ request: UserRequest;
6430
+ finish: (data: ClientState) => Promise<OperationResult<ClientState>>;
6431
+ }>;
6432
+ private prepareClientStateExcept;
6433
+ private finishClientStateExcept;
6417
6434
  /**
6418
6435
  * Секции, которых нет в клиентской проекции конфига, но которые система дочитала своим
6419
6436
  * `GetDefinitions` (бусты, рынок, PvP, ИИ): поднимаются из хранилища, если конфиг с тех пор не
@@ -7777,8 +7794,8 @@ interface AIGenerateOptions {
7777
7794
  */
7778
7795
  variables?: Record<string, string>;
7779
7796
  /**
7780
- * Template features only: the generation settings the player picked (`AIPublicTemplate.Settings`, key → value). The
7781
- * price follows them, see {@link AIService.estimateTemplatePrice}. Send the same values when you repeat the call
7797
+ * The generation settings the player picked, key → value: `AIPublicTemplate.Settings` on a template feature,
7798
+ * `AIPublicFeature.Settings` on a feature without one. The price follows them, see {@link AIService.estimateTemplatePrice}. Send the same values when you repeat the call
7782
7799
  * with `creditsConfirmationID`: the confirmed price is for these settings.
7783
7800
  */
7784
7801
  params?: Record<string, string>;
@@ -7873,7 +7890,8 @@ declare class AIService {
7873
7890
  */
7874
7891
  generateFromTemplate(featureKey: string, files?: Record<string, AIInputImage>, options?: AIGenerateOptions): Promise<OperationResult<AIGenerationView>>;
7875
7892
  /**
7876
- * The price of a template feature for the player's settings: the feature's price options, each scaled by how much
7893
+ * The price of a feature for the player's settings (a template feature, or a feature without a template that has
7894
+ * `Settings`): the feature's price options, each scaled by how much
7877
7895
  * these settings cost against the author's (the markup is kept). Charges nothing; files are not needed. An option
7878
7896
  * that cannot pay for this choice (a store purchase when the choice costs more) is left out.
7879
7897
  */