@orbit-software/sdk 1.88.2 → 1.90.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.
@@ -3,7 +3,15 @@
3
3
  "allow": [
4
4
  "mcp__acp__Edit",
5
5
  "mcp__acp__Bash",
6
- "mcp__acp__Write"
6
+ "mcp__acp__Write",
7
+ "Bash(npx tsc:*)",
8
+ "Bash(git add:*)",
9
+ "Bash(git commit:*)",
10
+ "Bash(git push:*)",
11
+ "Bash(npm info:*)",
12
+ "WebFetch(domain:unpkg.com)",
13
+ "Bash(pnpm install:*)",
14
+ "Bash(pnpm build:*)"
7
15
  ]
8
16
  }
9
17
  }
@@ -1,3 +1,3 @@
1
1
  export declare const useMiniApp: () => {
2
- miniApp: import('@twa-dev/types').WebApp;
2
+ miniApp: import('telegram-web-app').WebApp;
3
3
  };
@@ -0,0 +1,5 @@
1
+ export declare function initOrbitAds(): Promise<void>;
2
+ export declare function showOrbitAd<T extends boolean>(fallback?: () => Promise<boolean>, options?: {
3
+ zoneId?: number;
4
+ placementId?: string;
5
+ }): Promise<T>;
@@ -12,5 +12,6 @@ export interface MakeRequestConfig {
12
12
  getAuthData: () => string | null;
13
13
  getBotId: () => string | null;
14
14
  getInitData: () => string;
15
+ waitUntilReady?: () => Promise<unknown>;
15
16
  }
16
17
  export declare function createMakeRequest(config: MakeRequestConfig): <T>(path: string, method: "POST" | "GET" | "PUT" | "DELETE", body?: unknown) => Promise<T>;
@@ -0,0 +1,13 @@
1
+ import { WebApp } from 'telegram-web-app';
2
+ /**
3
+ * Ensures the Telegram WebApp script is loaded.
4
+ * If `window.Telegram.WebApp` already exists (e.g. injected by Telegram client
5
+ * or by the game itself), it is reused as-is.
6
+ * Otherwise, the official script is dynamically loaded from Telegram's CDN.
7
+ */
8
+ export declare function ensureTelegramWebApp(): Promise<WebApp>;
9
+ /**
10
+ * Synchronous getter for `window.Telegram.WebApp`.
11
+ * Must only be called after `ensureTelegramWebApp()` has resolved.
12
+ */
13
+ export declare function getTelegramWebApp(): WebApp;
package/dist/esm/sdk.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { AdsgramController, AdsgramInitOptions, CryptoSteamSDK as CryptoSteamSDKType, TMANetworkInterstitialResponse } from './types/sdk';
2
- export declare const BASE_URL = "https://app.portalapp.games/sdk";
1
+ import { AdsgramController, AdsgramInitOptions, CryptoSteamSDK as CryptoSteamSDKType, OrbitAdsResponse, TMANetworkInterstitialResponse } from './types/sdk';
2
+ export declare const BASE_URL: string;
3
3
  export declare const makeRequest: <T>(path: string, method: "POST" | "GET" | "PUT" | "DELETE", body?: unknown) => Promise<T>;
4
4
  export declare function startGameTimeTrack(): void;
5
5
  declare global {
@@ -19,6 +19,10 @@ declare global {
19
19
  transactionId?: string;
20
20
  showTag?: string;
21
21
  }) => Promise<void>;
22
+ showOrbitAds: (options?: {
23
+ zoneId?: number;
24
+ placementId?: string;
25
+ }) => Promise<OrbitAdsResponse>;
22
26
  }
23
27
  }
24
28
  declare global {
@@ -32,5 +36,4 @@ declare global {
32
36
  declare const CryptoSteamSDK: CryptoSteamSDKType;
33
37
  export default CryptoSteamSDK;
34
38
  export { CryptoSteamSDK as PortalSDK };
35
- export declare const TelegramWebApp: import('@twa-dev/types').WebApp;
36
39
  export type { AdType, Audience, CryptoSteamSDK, CryptoSteamSDKAd, CryptoSteamSDKAdMediaType, CryptoSteamSDKConfig, CryptoSteamSDKProfile, CryptoSteamSDKShopItem, CryptoSteamSDKTask, CryptoSteamSDKWage, InitializeOptions, OverlayConfig, PortalEmuSDK, ProfileBalances, RequestAdOptions, ShowPromiseResult, StartupConfig, } from './types/sdk';