@balancy/core
Advanced tools
Comparing version 1.0.0-rc.29 to 1.0.0
@@ -1,41 +0,78 @@ | ||
import { Core } from '@balancy/wasm'; | ||
import { AppConfig, CMS, Config } from './index'; | ||
import { Core, BalancyPurchaseProductResponseData, InitOptions } from '../../../wasm/dist'; | ||
import { AppConfig, BalancyStatus, CMS, Config } from './index'; | ||
import { AdsAdType } from '../enums'; | ||
import { Profiles } from './profiles.class'; | ||
import { SmartObjectsAbTestInfo, SmartObjectsEventInfo, SmartObjectsOfferInfo, SmartObjectsSegmentInfo } from '../liveops'; | ||
import { SmartObjectsAbTestInfo, SmartObjectsEventInfo, SmartObjectsOfferInfo, SmartObjectsSegmentInfo, SmartObjectsStoreItem } from '../liveops'; | ||
import { SmartObjectsOfferGroupInfo } from '../liveops/data.smartobjects.offergroupinfo.class'; | ||
import { UtilsEvent } from './utilsEvent'; | ||
export declare class Main { | ||
static isReadyToUse: boolean; | ||
private static balancy; | ||
static init(config: AppConfig): Promise<void>; | ||
static init(config: AppConfig, options?: InitOptions): Promise<void>; | ||
private static checkConfig; | ||
private static checkCallbacks; | ||
static initializeFileHelper(fh: Core['JSFileHelper']): Promise<void>; | ||
static configLaunch(): Promise<Config>; | ||
static initializeFileHelper(fh: Core['JSFileHelper'], options?: InitOptions): Promise<void>; | ||
static configLaunch(options?: InitOptions): Promise<Config>; | ||
} | ||
export declare class BalancyPaymentInfo { | ||
price: number; | ||
receipt: string; | ||
productId: string; | ||
currency: string; | ||
orderId: string; | ||
constructor(price: number, receipt: string, productId: string, currency: string, orderId: string); | ||
} | ||
export declare class Callbacks { | ||
static onDataUpdated: ((status: { | ||
isCloudSynchronized: boolean; | ||
static readonly onDataUpdated: UtilsEvent<[{ | ||
isCloudSynced: boolean; | ||
isCMSUpdated: boolean; | ||
isProfileUpdated: boolean; | ||
}) => void) | null; | ||
static onAuthFailed: ((status: { | ||
}]>; | ||
static readonly onAuthFailed: UtilsEvent<[{ | ||
message: string; | ||
}) => void) | null; | ||
static onCloudProfileFailedToLoad: ((status: { | ||
}]>; | ||
static readonly onCloudProfileFailedToLoad: UtilsEvent<[{ | ||
message: string; | ||
}) => void) | null; | ||
static onNewEventActivated: ((eventInfo: SmartObjectsEventInfo) => void) | null; | ||
static onEventDeactivated: ((eventInfo: SmartObjectsEventInfo) => void) | null; | ||
static onNewOfferActivated: ((offerInfo: SmartObjectsOfferInfo) => void) | null; | ||
static onOfferDeactivated: ((offerInfo: SmartObjectsOfferInfo, wasPurchased: boolean) => void) | null; | ||
static onNewOfferGroupActivated: ((offerGroupInfo: SmartObjectsOfferGroupInfo) => void) | null; | ||
static onOfferGroupDeactivated: ((offerGroupInfo: SmartObjectsOfferGroupInfo) => void) | null; | ||
static onNewAbTestStarted: ((abTestInfo: SmartObjectsAbTestInfo) => void) | null; | ||
static onAbTestEnded: ((abTestInfo: SmartObjectsAbTestInfo) => void) | null; | ||
static onSegmentInfoUpdated: ((segmentInfo: SmartObjectsSegmentInfo) => void) | null; | ||
}]>; | ||
static readonly onNewEventActivated: UtilsEvent<[SmartObjectsEventInfo]>; | ||
static readonly onEventDeactivated: UtilsEvent<[SmartObjectsEventInfo]>; | ||
static readonly onNewOfferActivated: UtilsEvent<[SmartObjectsOfferInfo]>; | ||
static readonly onOfferDeactivated: UtilsEvent<[SmartObjectsOfferInfo, boolean]>; | ||
static readonly onNewOfferGroupActivated: UtilsEvent<[SmartObjectsOfferGroupInfo]>; | ||
static readonly onOfferGroupDeactivated: UtilsEvent<[SmartObjectsOfferGroupInfo]>; | ||
static readonly onNewAbTestStarted: UtilsEvent<[SmartObjectsAbTestInfo]>; | ||
static readonly onAbTestEnded: UtilsEvent<[SmartObjectsAbTestInfo]>; | ||
static readonly onSegmentInfoUpdated: UtilsEvent<[SmartObjectsSegmentInfo]>; | ||
static readonly onShopUpdated: UtilsEvent<[]>; | ||
static initExamplesWithLogs(): void; | ||
static clearAll(): void; | ||
} | ||
export declare class APILocalization { | ||
private readonly wasm; | ||
private static instance; | ||
constructor(wasm: Core); | ||
static getLocalizedValue(key: string): string; | ||
} | ||
export declare class API { | ||
readonly wasm: Core; | ||
readonly cms: CMS; | ||
static Localization: typeof APILocalization; | ||
private static instance; | ||
private localizationInstance; | ||
private static status; | ||
constructor(wasm: Core, cms: CMS); | ||
static getStatus(): BalancyStatus; | ||
static trackAdRevenue(type: AdsAdType, revenue: number, placement: string): void; | ||
static softPurchaseStoreItem(storeItem: SmartObjectsStoreItem): boolean; | ||
static softPurchaseGameOffer(offerInfo: SmartObjectsOfferInfo): boolean; | ||
static softPurchaseGameOfferGroup(offerGroupInfo: SmartObjectsOfferGroupInfo, storeItem: SmartObjectsStoreItem): boolean; | ||
static hardPurchaseStoreItem(storeItem: SmartObjectsStoreItem, paymentInfo: BalancyPaymentInfo, callback: (responseData: BalancyPurchaseProductResponseData) => void, requireValidation: boolean): void; | ||
static hardPurchaseGameOffer(offerInfo: SmartObjectsOfferInfo, paymentInfo: BalancyPaymentInfo, callback: (responseData: BalancyPurchaseProductResponseData) => void, requireValidation: boolean): void; | ||
static hardPurchaseGameOfferGroup(offerGroupInfo: SmartObjectsOfferGroupInfo, storeItem: SmartObjectsStoreItem, paymentInfo: BalancyPaymentInfo, callback: (responseData: BalancyPurchaseProductResponseData) => void, requireValidation: boolean): void; | ||
private toNative; | ||
} | ||
export declare class Balancy { | ||
private wasm; | ||
private balancyCMS; | ||
private balancyAPI; | ||
private balancyProfiles; | ||
@@ -46,5 +83,7 @@ private balancyCoreAppConfig; | ||
static Callbacks: typeof Callbacks; | ||
static API: typeof API; | ||
static Profiles: typeof Profiles; | ||
private static LibraryMethods; | ||
constructor(wasm: Core); | ||
private userDataInitialized; | ||
static initFileHelper(wasm: Core, fh: Core['JSFileHelper']): void; | ||
@@ -51,0 +90,0 @@ initializeFileHelper(fh: Core['JSFileHelper']): void; |
@@ -1,3 +0,7 @@ | ||
import { Core } from '@balancy/wasm'; | ||
import { Core } from '../../../wasm/dist'; | ||
import { BaseModel } from './balancy-model.class'; | ||
type Constructor<T> = { | ||
new (...args: any[]): T; | ||
getFileName(): string; | ||
}; | ||
export declare class CMS { | ||
@@ -13,8 +17,11 @@ readonly wasm: Core; | ||
getWasm(): Core; | ||
static getModels<T extends BaseModel>(modelClass: Constructor<T>, includeChildren: boolean): T[]; | ||
static getModelByUnnyId<T extends BaseModel>(inUnnyId: string): T | null; | ||
refreshAll(): void; | ||
getModelByUnnyIdPrivate<T extends BaseModel>(unnyId: string): T | null; | ||
static register(fullNameWithNamespaces: string, constructor: new () => BaseModel): void; | ||
private instantiateByType; | ||
modelRefreshed(unnyId: string, newPointer: number): void; | ||
refreshAll(): void; | ||
} | ||
export {}; | ||
//# sourceMappingURL=cms.class.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { CoreConfigStatus } from '@balancy/wasm'; | ||
import { CoreConfigStatus } from '../../../wasm/dist'; | ||
export declare class ConfigStatus { | ||
@@ -3,0 +3,0 @@ constructor(status: CoreConfigStatus); |
@@ -1,2 +0,2 @@ | ||
import { CoreConfig } from '@balancy/wasm'; | ||
import { CoreConfig } from '../../../wasm/dist'; | ||
import { GameInfo } from './game-info.class'; | ||
@@ -3,0 +3,0 @@ import { Balancy } from './balancy.class'; |
@@ -1,2 +0,2 @@ | ||
import { CoreGameInfo } from '@balancy/wasm'; | ||
import { CoreGameInfo } from '../../../wasm/dist'; | ||
export declare class GameInfo { | ||
@@ -3,0 +3,0 @@ constructor(coreInfo: CoreGameInfo); |
export * from './json-object.class'; | ||
export * from './app-config.class'; | ||
export * from './balancy-status'; | ||
export * from './cms.class'; | ||
@@ -12,2 +13,3 @@ export * from './balancy.class'; | ||
export * from './export'; | ||
export * from './utilsEvent'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -16,2 +16,3 @@ import { CMS } from './cms.class'; | ||
initData(): void; | ||
getRawPointer(): number; | ||
equals(ptr: number): boolean; | ||
@@ -18,0 +19,0 @@ refreshData(p: number): void; |
@@ -1,2 +0,2 @@ | ||
import { Core, CoreVector } from '@balancy/wasm'; | ||
import { Core, CoreVector } from '../../../wasm/dist'; | ||
export declare class LibraryMethods { | ||
@@ -6,2 +6,3 @@ private static wasm; | ||
static getModelByUnnyId(inUnnyId: string): number; | ||
static getModelUnnyIds(templateName: string, includeChildren: boolean): CoreVector<string>; | ||
static getProfile(profileName: string): number; | ||
@@ -8,0 +9,0 @@ static getInheritance(): CoreVector<string>; |
export declare class LocalizedString { | ||
private localizedKey; | ||
constructor(localizedKey: string); | ||
getValue(): string; | ||
get key(): string; | ||
get value(): string; | ||
hasValue(): boolean; | ||
@@ -6,0 +7,0 @@ toString(): string; |
@@ -0,1 +1,2 @@ | ||
export * from './ads.adtype.enum'; | ||
export * from './platform.enum'; | ||
@@ -2,0 +3,0 @@ export * from './environment.enum'; |
@@ -15,4 +15,5 @@ export declare enum NotificationType { | ||
OnSegmentUpdated = 108, | ||
Unknown = 109 | ||
OnShopUpdated = 109, | ||
Unknown = 110 | ||
} | ||
//# sourceMappingURL=notification-type.enum.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { CoreVector } from '@balancy/wasm'; | ||
import { CoreVector } from '../../../wasm/dist'; | ||
export declare function vectorToArray<T>(vector: CoreVector<T>): Array<T>; | ||
@@ -3,0 +3,0 @@ export declare function vectorToArrayBoolean(vector: CoreVector<number>): Array<boolean>; |
import { Balancy } from './core'; | ||
import { Core } from '@balancy/wasm'; | ||
import { Core } from '../../wasm/dist'; | ||
export * from './core'; | ||
@@ -4,0 +4,0 @@ export * from './decorators'; |
@@ -11,2 +11,3 @@ import { BaseData } from '../profile/base-data.class'; | ||
get gameEvent(): Nullable<SmartObjectsGameEvent>; | ||
get GameEventUnnyId(): string; | ||
get offerInstanceId(): string; | ||
@@ -27,3 +28,4 @@ set offerInstanceId(value: string); | ||
private update_session; | ||
getSecondsLeftBeforeDeactivation(): number; | ||
} | ||
//# sourceMappingURL=data.smartobjects.eventinfo.class.d.ts.map |
@@ -7,2 +7,3 @@ import { BaseData } from '../profile/base-data.class'; | ||
private _platform; | ||
private _platformId; | ||
private _systemLanguage; | ||
@@ -37,2 +38,3 @@ private _country; | ||
get platform(): string; | ||
get platformId(): number; | ||
get systemLanguage(): string; | ||
@@ -75,2 +77,3 @@ get country(): string; | ||
private update_platform; | ||
private update_platformId; | ||
private update_systemLanguage; | ||
@@ -77,0 +80,0 @@ private update_country; |
import { BaseData } from '../profile/base-data.class'; | ||
import { Nullable } from '../core'; | ||
import { SmartObjectsItem } from './models.smartobjects.item.class'; | ||
export declare class SmartObjectsItemInstance extends BaseData { | ||
@@ -6,8 +8,10 @@ private _a; | ||
private _u; | ||
get a(): number; | ||
set a(value: number); | ||
get c(): number; | ||
set c(value: number); | ||
get u(): number; | ||
set u(value: number); | ||
private _i; | ||
get amount(): number; | ||
set amount(value: number); | ||
get created(): number; | ||
set created(value: number); | ||
get updated(): number; | ||
set updated(value: number); | ||
get item(): Nullable<SmartObjectsItem>; | ||
initData(): void; | ||
@@ -18,3 +22,4 @@ static getFileName(): string; | ||
private update_u; | ||
private update_i; | ||
} | ||
//# sourceMappingURL=data.smartobjects.iteminstance.class.d.ts.map |
@@ -19,3 +19,4 @@ import { Nullable } from '../core/json-object.class'; | ||
private update_unnyIdGameOfferGroup; | ||
canPurchase(storeItem: Nullable<SmartObjectsStoreItem>): boolean; | ||
} | ||
//# sourceMappingURL=data.smartobjects.offergroupinfo.class.d.ts.map |
@@ -22,3 +22,4 @@ import { Nullable } from '../core/json-object.class'; | ||
private update_session; | ||
getSecondsLeftBeforeDeactivation(): number; | ||
} | ||
//# sourceMappingURL=data.smartobjects.offerinfobase.class.d.ts.map |
@@ -7,2 +7,3 @@ import { BaseData } from '../profile/base-data.class'; | ||
import { Nullable } from '../core'; | ||
import { SmartObjectsGameEvent } from './models.smartobjects.gameevent.class'; | ||
export declare class SmartObjectsSmartInfo extends BaseData { | ||
@@ -20,3 +21,5 @@ private _gameOffers; | ||
findOfferGroupInfo(ptr: number): Nullable<SmartObjectsOfferGroupInfo>; | ||
getGameEvent(gameEvent: SmartObjectsGameEvent): Nullable<SmartObjectsEventInfo>; | ||
hasGameEvent(gameEvent: SmartObjectsGameEvent): boolean; | ||
} | ||
//# sourceMappingURL=data.smartobjects.smartinfo.class.d.ts.map |
@@ -7,3 +7,5 @@ import { BaseData } from '../profile/base-data.class'; | ||
private _tests; | ||
private _avoidedTests; | ||
get tests(): SmartList<SmartObjectsAbTestInfo>; | ||
get avoidedTests(): string[]; | ||
initData(): void; | ||
@@ -10,0 +12,0 @@ static getFileName(): string; |
@@ -37,2 +37,3 @@ import { BaseModel } from '../core/balancy-model.class'; | ||
export { SmartObjectsOfferInfo } from './data.smartobjects.offerinfo.class'; | ||
export { SmartObjectsOfferGroupInfo } from './data.smartobjects.offergroupinfo.class'; | ||
export { SmartObjectsInventory } from './data.smartobjects.inventory.class'; | ||
@@ -39,0 +40,0 @@ export { SmartObjectsInventorySlot } from './data.smartobjects.inventoryslot.class'; |
@@ -15,3 +15,5 @@ import { BaseModel } from '../core/balancy-model.class'; | ||
static getFileName(): string; | ||
getSecondsLeftBeforeDeactivation(): number; | ||
getSecondsBeforeActivation(ignoreTriggers?: boolean): number; | ||
} | ||
//# sourceMappingURL=models.smartobjects.gameevent.class.d.ts.map |
@@ -5,3 +5,2 @@ import { BaseModel } from '../core/balancy-model.class'; | ||
export declare class SmartObjectsItem extends BaseModel { | ||
static getTest(): string; | ||
private _name; | ||
@@ -8,0 +7,0 @@ private _maxStack; |
import { BaseData } from './base-data.class'; | ||
export declare class ParentBaseData extends BaseData { | ||
getAllUserDataProperties(): string[]; | ||
reset(): void; | ||
static getFileName(): string; | ||
getLastCloudSyncTime(): number; | ||
} | ||
//# sourceMappingURL=data.parentbasedata.class.d.ts.map |
@@ -11,2 +11,3 @@ import { BaseData } from './base-data.class'; | ||
setConstructor(modelClass: Constructor<T>): void; | ||
toArray(): T[]; | ||
add(): T; | ||
@@ -13,0 +14,0 @@ removeAt(index: number): void; |
{ | ||
"name": "@balancy/core", | ||
"version": "1.0.0-rc.29", | ||
"version": "1.0.0", | ||
"homepage": "https://balancy.co", | ||
@@ -39,5 +39,5 @@ "repository": { | ||
"dependencies": { | ||
"@balancy/wasm": "~1.0.0-rc.29", | ||
"@balancy/wasm": "~1.0.0", | ||
"reflect-metadata": "^0.2.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1364913
220
32154
0
Updated@balancy/wasm@~1.0.0