@series-inc/rundot-game-sdk 5.4.0 → 5.5.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.
@@ -1011,8 +1011,9 @@ interface IapApi {
1011
1011
  openStore(): Promise<OpenStoreResult>;
1012
1012
  getCurrencyIcon(): Promise<LoadEmbeddedAssetsResponse>;
1013
1013
  getUserSubscriptionStatus(subscriptionName: string): Promise<SubscriptionStatusResponse | null>;
1014
- getSubscriptionsForOffering(offeringName: string): Promise<IapSubscription[]>;
1015
- purchaseSubscriptionFromOffering(offeringName: string, productId: string): Promise<PurchaseResponse>;
1014
+ getSubscriptionsForOffering(offeringId: string): Promise<IapSubscription[]>;
1015
+ purchaseSubscriptionFromOffering(offeringId: string, productId: string): Promise<PurchaseResponse>;
1016
+ hasUserMadePurchase(): Promise<boolean>;
1016
1017
  }
1017
1018
 
1018
1019
  interface LeaderboardModeConfig {
@@ -55,6 +55,7 @@ var RundotGameMessageId = /* @__PURE__ */ ((RundotGameMessageId2) => {
55
55
  RundotGameMessageId2["H5_IAP_GET_SUBSCRIPTIONS"] = "H5_IAP_GET_SUBSCRIPTIONS";
56
56
  RundotGameMessageId2["H5_IAP_PURCHASE_SUBSCRIPTION"] = "H5_IAP_PURCHASE_SUBSCRIPTION";
57
57
  RundotGameMessageId2["H5_IAP_GET_PLAYER_SUBSCRIPTION_INFO"] = "H5_IAP_GET_PLAYER_SUBSCRIPTION_INFO";
58
+ RundotGameMessageId2["H5_IAP_HAS_USER_MADE_PURCHASE"] = "H5_IAP_HAS_USER_MADE_PURCHASE";
58
59
  RundotGameMessageId2["IAP_SPEND_CURRENCY_COMPLETE"] = "IAP_SPEND_CURRENCY_COMPLETE";
59
60
  RundotGameMessageId2["IAP_WALLET_UPDATE"] = "IAP_WALLET_UPDATE";
60
61
  RundotGameMessageId2["READY"] = "READY";
@@ -1552,17 +1553,20 @@ var RpcIapApi = class {
1552
1553
  subscriptionName
1553
1554
  });
1554
1555
  }
1555
- async getSubscriptionsForOffering(offeringName) {
1556
+ async getSubscriptionsForOffering(offeringId) {
1556
1557
  return await this.rpcClient.callT("H5_IAP_GET_SUBSCRIPTIONS" /* H5_IAP_GET_SUBSCRIPTIONS */, {
1557
- offeringName
1558
+ offeringId
1558
1559
  });
1559
1560
  }
1560
- async purchaseSubscriptionFromOffering(offeringName, productId) {
1561
+ async purchaseSubscriptionFromOffering(offeringId, productId) {
1561
1562
  return await this.rpcClient.callT("H5_IAP_PURCHASE_SUBSCRIPTION" /* H5_IAP_PURCHASE_SUBSCRIPTION */, {
1562
- offeringName,
1563
+ offeringId,
1563
1564
  productId
1564
1565
  }, -1);
1565
1566
  }
1567
+ async hasUserMadePurchase() {
1568
+ return await this.rpcClient.call("H5_IAP_HAS_USER_MADE_PURCHASE" /* H5_IAP_HAS_USER_MADE_PURCHASE */);
1569
+ }
1566
1570
  };
1567
1571
 
1568
1572
  // src/iap/MockCurrencyIcon.ts
@@ -1612,8 +1616,8 @@ var MockIapApi = class {
1612
1616
  store: "APP_STORE"
1613
1617
  };
1614
1618
  }
1615
- async getSubscriptionsForOffering(offeringName) {
1616
- console.log("[Mock IAP] get subscriptions for offering called for offering", offeringName);
1619
+ async getSubscriptionsForOffering(offeringId) {
1620
+ console.log("[Mock IAP] get subscriptions for offering called for offering", offeringId);
1617
1621
  return [{
1618
1622
  offeringId: "mockOffering",
1619
1623
  productId: "mockProduct",
@@ -1626,12 +1630,16 @@ var MockIapApi = class {
1626
1630
  pricePerYear: 6.99
1627
1631
  }];
1628
1632
  }
1629
- async purchaseSubscriptionFromOffering(offeringName, productId) {
1630
- console.log(`[Mock IAP] purchase subscription from offering called for offering ${offeringName} for product ${productId}`);
1633
+ async purchaseSubscriptionFromOffering(offeringId, productId) {
1634
+ console.log(`[Mock IAP] purchase subscription from offering called for offering ${offeringId} for product ${productId}`);
1631
1635
  return {
1632
1636
  success: true
1633
1637
  };
1634
1638
  }
1639
+ async hasUserMadePurchase() {
1640
+ console.log("[Mock IAP] has user made purchase called");
1641
+ return false;
1642
+ }
1635
1643
  };
1636
1644
 
1637
1645
  // src/iap/index.ts
@@ -3730,5 +3738,5 @@ var MockSocialApi = class {
3730
3738
  };
3731
3739
 
3732
3740
  export { BaseCdnApi, DEFAULT_SHARED_LIB_CDN_BASE, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, FILE_EXTENSION_PATTERN, HapticFeedbackStyle, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, MIN_CDN_PATH_SEGMENTS, MODULE_TO_LIBRARY_SPECIFIERS, MockAdsApi, MockAiApi, MockAnalyticsApi, MockAvatarApi, MockCdnApi, MockDeviceApi, MockEntitlementApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLifecycleApi, MockLoggingApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockSocialApi, MockStorageApi, MockSystemApi, MockTimeApi, PackageType, ROOM_GAME_PHASES, RpcAdsApi, RpcAiApi, RpcAnalyticsApi, RpcAvatarApi, RpcEntitlementApi, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcLifecycleApi, RpcLoggingApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRoomsApi, RpcSharedAssetsApi, RpcStorageApi, RundotGameMessageId, RundotGameRoom, SandboxProfileApi, base64ToArrayBuffer, base64ToUtf8, createMockStorageApi, generateId, getLibraryDefinition, hasHostedUrlStructure, initializeAds, initializeAi, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeEntitlements, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, isPacificDaylightTime, parseCdnPathSegments, setupRoomNotifications };
3733
- //# sourceMappingURL=chunk-FH3D36SQ.js.map
3734
- //# sourceMappingURL=chunk-FH3D36SQ.js.map
3741
+ //# sourceMappingURL=chunk-75BC3PES.js.map
3742
+ //# sourceMappingURL=chunk-75BC3PES.js.map