@genex-ai/embed-sdk 0.31.0 → 0.32.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/README.md +214 -0
- package/dist/{chunk-QNZZIJGP.js → chunk-NBCL5P5V.js} +788 -64
- package/dist/chunk-QBCWKMVQ.js +534 -0
- package/dist/development.js +1 -1
- package/dist/index.d.ts +253 -8
- package/dist/index.js +24 -2
- package/dist/sentry.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-MJPLBT3T.js +0 -264
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import { R as RuntimeJudgeQuestion, c as RuntimeJudgeAnswer, d as RuntimeJudgmentView, a as RuntimeWorkflowInput, e as RuntimeGenerationBilling, f as RuntimeGenerationFunding, g as RuntimeGrantView, b as RuntimeGenerationView, h as RuntimeGenerationModels, i as RuntimeWorkflowOfferings } from './runtime-generation-B3oFDmCp.js';
|
|
2
2
|
export { j as RuntimeBillingPolicy, k as RuntimeCurrency, l as RuntimeExternalProvider, m as RuntimeGenerationStatus, n as RuntimeGenerationStreamEvent, o as RuntimeGrantJudgeTerms, p as RuntimeGrantStatus, q as RuntimeGrantTerms, r as RuntimeJudgeCriterion } from './runtime-generation-B3oFDmCp.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Why a platform call did not happen. One vocabulary for every SDK function,
|
|
6
|
+
* whether the reason was found in the game's own page or sent back by the
|
|
7
|
+
* dashboard in `code`:
|
|
8
|
+
*
|
|
9
|
+
* - `unsupported`: this shell has no way to do it.
|
|
10
|
+
* - `needs_gesture`: the browser wants a click or a tap behind the call.
|
|
11
|
+
* - `dismissed`: the player said no.
|
|
12
|
+
* - `busy`: another confirmation is already on screen.
|
|
13
|
+
* - `rate_limited`: this game asked too often.
|
|
14
|
+
* - `invalid_request`: the arguments are outside the bounds below.
|
|
15
|
+
* - `too_large`: the file is over `SAVE_MAX_BYTES`.
|
|
16
|
+
* - `timeout`: no answer came back. Only the SDK reports this one.
|
|
17
|
+
*/
|
|
18
|
+
declare const PLATFORM_ERRORS: readonly ["unsupported", "needs_gesture", "dismissed", "busy", "rate_limited", "invalid_request", "too_large", "timeout"];
|
|
19
|
+
type PlatformError = (typeof PLATFORM_ERRORS)[number];
|
|
20
|
+
|
|
4
21
|
/** A thing the game sells. Resolved server-side; the game never sets a price. */
|
|
5
22
|
interface ShopItem {
|
|
6
23
|
id: string;
|
|
@@ -402,6 +419,137 @@ declare function judge(options: JudgeOptions): Promise<JudgeResult>;
|
|
|
402
419
|
*/
|
|
403
420
|
declare function generationErrorMessage(code: string | undefined): string;
|
|
404
421
|
|
|
422
|
+
/** How a platform call ended: done, or not done and the one reason why. */
|
|
423
|
+
type PlatformOutcome = {
|
|
424
|
+
ok: true;
|
|
425
|
+
} | {
|
|
426
|
+
ok: false;
|
|
427
|
+
error: PlatformError;
|
|
428
|
+
};
|
|
429
|
+
interface ShareOptions {
|
|
430
|
+
/**
|
|
431
|
+
* A line to go with the link ("Join my room"). The system share sheet shows
|
|
432
|
+
* it; when the link is copied instead, only the link is copied.
|
|
433
|
+
*/
|
|
434
|
+
text?: string;
|
|
435
|
+
/**
|
|
436
|
+
* Your own parameters for the link, e.g. `{ room: 'abc' }`. Whoever opens it
|
|
437
|
+
* reads them back with `getEntry().params`. `embed`, `ref`, `s`, `from`,
|
|
438
|
+
* `remix`, `slug` and every name starting `genex_` are the platform's and
|
|
439
|
+
* are left out.
|
|
440
|
+
*/
|
|
441
|
+
params?: Record<string, string | number | boolean>;
|
|
442
|
+
}
|
|
443
|
+
interface ShareResult {
|
|
444
|
+
/**
|
|
445
|
+
* `shared`: the system share sheet took it. `copied`: no sheet here, the
|
|
446
|
+
* link is on the clipboard. `dismissed`: the player closed the sheet.
|
|
447
|
+
* `unavailable`: neither worked; show `url` so the player can copy it.
|
|
448
|
+
*/
|
|
449
|
+
status: 'shared' | 'copied' | 'dismissed' | 'unavailable';
|
|
450
|
+
/** The link, built by the SDK: the game's page, plus your `params`. */
|
|
451
|
+
url: string;
|
|
452
|
+
}
|
|
453
|
+
type HapticKind = 'selection' | 'light' | 'medium' | 'heavy' | 'success' | 'warning' | 'error';
|
|
454
|
+
/** What supports() can be asked about: one name per function in this module. */
|
|
455
|
+
type PlatformFeature = 'share' | 'copy' | 'awake' | 'haptic' | 'open' | 'save' | 'fullscreen';
|
|
456
|
+
/**
|
|
457
|
+
* Share this game. The link is the SDK's to build, never the caller's: the
|
|
458
|
+
* game's page on Genex (on a creator's own domain, that address), plus your
|
|
459
|
+
* `params`, which come back through `getEntry().params` for whoever opens it.
|
|
460
|
+
*
|
|
461
|
+
* **Call it from a click or tap handler.** It opens the system share sheet
|
|
462
|
+
* where the browser has one; where it has none it copies the link and says
|
|
463
|
+
* `copied`; and when neither works it hands the link back as `unavailable`,
|
|
464
|
+
* for the game to show. An open sheet is waited on for as long as the player
|
|
465
|
+
* keeps it open: no timer ends it. On a dev server (local test mode) the sheet
|
|
466
|
+
* is never opened, so an automated browser is not left waiting on it.
|
|
467
|
+
*
|
|
468
|
+
* ```ts
|
|
469
|
+
* inviteButton.addEventListener('click', async () => {
|
|
470
|
+
* const { status, url } = await share({ text: 'Join my room', params: { room } });
|
|
471
|
+
* if (status === 'copied') toast('Link copied');
|
|
472
|
+
* if (status === 'unavailable') showLink(url);
|
|
473
|
+
* });
|
|
474
|
+
* ```
|
|
475
|
+
*/
|
|
476
|
+
declare function share(options?: ShareOptions): Promise<ShareResult>;
|
|
477
|
+
/**
|
|
478
|
+
* Copy text to the clipboard. **Call it from a click or tap handler.**
|
|
479
|
+
*
|
|
480
|
+
* The Clipboard API first. In a frame it works only where the page around the
|
|
481
|
+
* game delegates it, so its refusal is followed by the older selection copy,
|
|
482
|
+
* which a frame is allowed after a tap either way.
|
|
483
|
+
*/
|
|
484
|
+
declare function copyText(text: string): Promise<PlatformOutcome>;
|
|
485
|
+
/**
|
|
486
|
+
* Keep the screen from dimming and locking (`true`), or stop (`false`): a
|
|
487
|
+
* cutscene, a tilt or gamepad game nobody is touching.
|
|
488
|
+
*
|
|
489
|
+
* The browser drops the lock whenever the tab is hidden; it is taken again
|
|
490
|
+
* when the player comes back, for as long as this is on. In the Genex app the
|
|
491
|
+
* screen already stays on while a game is open, so this resolves `ok` there
|
|
492
|
+
* without asking for anything.
|
|
493
|
+
*/
|
|
494
|
+
declare function keepAwake(on: boolean): Promise<PlatformOutcome>;
|
|
495
|
+
/**
|
|
496
|
+
* A short vibration, by kind. Fire and forget: no result, never throws.
|
|
497
|
+
*
|
|
498
|
+
* It buzzes where the browser can (Android browsers, after the player's first
|
|
499
|
+
* tap). It does nothing on an iPhone, whose browsers have no vibration, and
|
|
500
|
+
* nothing in the Genex app, whose own haptics are not open to games. Use it as
|
|
501
|
+
* a garnish, never as the only signal that something happened.
|
|
502
|
+
*/
|
|
503
|
+
declare function haptic(kind: HapticKind): void;
|
|
504
|
+
/**
|
|
505
|
+
* Open a link in a new tab: a Discord invite, the creator's site, credits.
|
|
506
|
+
* `https://` only, at most 2048 characters. **Call it from a click or tap
|
|
507
|
+
* handler.**
|
|
508
|
+
*
|
|
509
|
+
* On the Genex game page the dashboard asks the player first, showing where
|
|
510
|
+
* the link goes, and opens it on their click there; `dismissed` is their no.
|
|
511
|
+
* On the game's own address it is a new tab. In the Genex app links out of a
|
|
512
|
+
* game are not available (`unsupported`): show the address instead.
|
|
513
|
+
*/
|
|
514
|
+
declare function openExternal(url: string): Promise<PlatformOutcome>;
|
|
515
|
+
/**
|
|
516
|
+
* Save a file to the player's device: a screenshot, a replay, an export.
|
|
517
|
+
* **Call it from a click or tap handler.**
|
|
518
|
+
*
|
|
519
|
+
* The same bounds in every shell, so a save that works on the game's own link
|
|
520
|
+
* works on Genex: at most 50 MB; PNG, JPEG, WebP, WebM, MP4, JSON or plain
|
|
521
|
+
* text (the Blob's `type`); a file name of 1 to 128 characters with no path
|
|
522
|
+
* in it. The saved file's extension follows the type, whatever the name says.
|
|
523
|
+
*
|
|
524
|
+
* On the Genex game page the dashboard asks the player first and saves on
|
|
525
|
+
* their click there. In the Genex app it is not available (`unsupported`).
|
|
526
|
+
*/
|
|
527
|
+
declare function saveFile(file: Blob, name: string): Promise<PlatformOutcome>;
|
|
528
|
+
/**
|
|
529
|
+
* Enter (`true`) or leave (`false`) fullscreen. **Call it from a click or tap
|
|
530
|
+
* handler.**
|
|
531
|
+
*
|
|
532
|
+
* On the Genex game page this is the PAGE's fullscreen, the one its own
|
|
533
|
+
* button gives, so the page's controls stay on top of the game. A game's own
|
|
534
|
+
* `requestFullscreen()` fullscreens only the frame's document, and does
|
|
535
|
+
* nothing at all on a phone whose browser has no element fullscreen. On the
|
|
536
|
+
* game's own address it is the browser's fullscreen. In the Genex app the
|
|
537
|
+
* game already has the whole screen and there is nothing to toggle
|
|
538
|
+
* (`unsupported`).
|
|
539
|
+
*/
|
|
540
|
+
declare function setFullscreen(on: boolean): Promise<PlatformOutcome>;
|
|
541
|
+
/**
|
|
542
|
+
* Whether a function here can do its job in this shell and this browser:
|
|
543
|
+
* `supports('open')` for `openExternal()`, `'save'` for `saveFile()`, `'copy'`
|
|
544
|
+
* for `copyText()`, `'awake'` for `keepAwake()`, and the rest by name.
|
|
545
|
+
* Synchronous, for deciding whether to draw a button at all.
|
|
546
|
+
*
|
|
547
|
+
* On the Genex game page the answer for `open`, `save` and the page's
|
|
548
|
+
* fullscreen arrives with the identity handshake: ask after `waitForPlayer()`.
|
|
549
|
+
* A hint, not a promise. The call's own result is the truth.
|
|
550
|
+
*/
|
|
551
|
+
declare function supports(feature: PlatformFeature): boolean;
|
|
552
|
+
|
|
405
553
|
interface EmbedConfig {
|
|
406
554
|
/** This game's own slug (GENEX.slug) — identifies the project to /play/authorize. */
|
|
407
555
|
slug: string;
|
|
@@ -427,6 +575,39 @@ interface EmbedUser {
|
|
|
427
575
|
}
|
|
428
576
|
type AuthState = 'pending' | 'authenticated' | 'guest' | 'blocked';
|
|
429
577
|
type EmbedEvent = 'authenticated' | 'guest' | 'blocked' | 'error';
|
|
578
|
+
/** The link this page was opened with — see getEntry(). */
|
|
579
|
+
interface EmbedEntry {
|
|
580
|
+
/**
|
|
581
|
+
* The link's own query: `?room=abc&film`, or `''`. The pairs the visitor's
|
|
582
|
+
* link carried, in their order and byte for byte, minus the platform's keys:
|
|
583
|
+
* `embed` and everything starting `genex_`, wherever the game runs. A link
|
|
584
|
+
* to the game's page on Genex, and one opened in the Genex app, also loses
|
|
585
|
+
* `ref`, `s`, `from`, `remix` and `slug`, which Genex reads there itself; on
|
|
586
|
+
* the game's own address those five reach the game.
|
|
587
|
+
*/
|
|
588
|
+
search: string;
|
|
589
|
+
/** The same query, parsed. A fresh object on every call. */
|
|
590
|
+
params: URLSearchParams;
|
|
591
|
+
/**
|
|
592
|
+
* The link's own fragment: `#lobby`, or `''`. A fragment that contains
|
|
593
|
+
* `genex_` is never carried, and on the game's page on Genex neither is
|
|
594
|
+
* `#credits`, which opens Genex's own settings there.
|
|
595
|
+
*/
|
|
596
|
+
hash: string;
|
|
597
|
+
/**
|
|
598
|
+
* The origin of the site the visitor came from (`https://example.com`), or
|
|
599
|
+
* null when there is none or it is not known. Never a path or a query.
|
|
600
|
+
* Attribution data, not a credential: a link can claim any origin.
|
|
601
|
+
*/
|
|
602
|
+
referrer: string | null;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Where the game is running — see getShell(). `page`: in a frame, which is its
|
|
606
|
+
* Genex game page or any other page that embeds it. `app`: the Genex mobile
|
|
607
|
+
* app. `standalone`: its own tab on its own address. `local`: a dev server in
|
|
608
|
+
* local test mode.
|
|
609
|
+
*/
|
|
610
|
+
type EmbedShell = 'page' | 'app' | 'standalone' | 'local';
|
|
430
611
|
interface PlayerStateResult {
|
|
431
612
|
/** The saved blob, or null when this player never saved. For guests: the queued pending save, if any. */
|
|
432
613
|
data: unknown;
|
|
@@ -458,7 +639,8 @@ interface SaveStateResult {
|
|
|
458
639
|
conflict?: boolean;
|
|
459
640
|
/** True when the caller is a guest — accounts save, guests don't. */
|
|
460
641
|
guest?: boolean;
|
|
461
|
-
/** True when
|
|
642
|
+
/** True when a guest's value was held in memory for this page load. It is sent only if an
|
|
643
|
+
* account arrives without a reload, which no Genex shell does today: signing in loads the game again. */
|
|
462
644
|
queued?: boolean;
|
|
463
645
|
/**
|
|
464
646
|
* True when the build is running on the PREVIEW channel (the owner's draft
|
|
@@ -475,7 +657,8 @@ interface SubmitScoreResult {
|
|
|
475
657
|
/** True when this submit improved the player's best. */
|
|
476
658
|
improved?: boolean;
|
|
477
659
|
guest?: boolean;
|
|
478
|
-
/** True when
|
|
660
|
+
/** True when a guest's score was held in memory for this page load. It is sent only if an
|
|
661
|
+
* account arrives without a reload, which no Genex shell does today. */
|
|
479
662
|
queued?: boolean;
|
|
480
663
|
}
|
|
481
664
|
interface LeaderboardEntry {
|
|
@@ -596,6 +779,60 @@ declare function initEmbed(cfg: EmbedConfig): void;
|
|
|
596
779
|
* "is authenticated". True even before the handshake resolves.
|
|
597
780
|
*/
|
|
598
781
|
declare function isEmbedded(): boolean;
|
|
782
|
+
/**
|
|
783
|
+
* The link this page was opened with, and where the visitor came from: the
|
|
784
|
+
* same answer in every shell, whenever it is asked.
|
|
785
|
+
*
|
|
786
|
+
* Read the game's own URL parameters HERE rather than from `location`. On a
|
|
787
|
+
* standalone visit the page first loads with Genex's return fragment in the
|
|
788
|
+
* address bar; initEmbed() puts the game's own fragment back, but that rewrite
|
|
789
|
+
* fires no `hashchange`, so code that read `location.hash` before initEmbed()
|
|
790
|
+
* saw the wrong one and is never told. This is right before and after. And
|
|
791
|
+
* `document.referrer` is the Genex dashboard after the sign-in round trip (and
|
|
792
|
+
* inside the game page); `referrer` here is the site the visitor came from.
|
|
793
|
+
*
|
|
794
|
+
* `referrer` is resolved once per browser tab and kept in the tab's
|
|
795
|
+
* sessionStorage, so a reload answers the same. Where the browser withholds
|
|
796
|
+
* that storage from the game (site data blocked) there is nowhere to keep it,
|
|
797
|
+
* and a reload answers from what that load was handed: `null`, or Genex's own
|
|
798
|
+
* origin, never again the site the visitor first came from. A shell older
|
|
799
|
+
* than this SDK carries less: whatever it did not send is empty or null,
|
|
800
|
+
* never an error.
|
|
801
|
+
*/
|
|
802
|
+
declare function getEntry(): EmbedEntry;
|
|
803
|
+
/**
|
|
804
|
+
* Which shell the game is running in. Synchronous, and safe before
|
|
805
|
+
* initEmbed(): `page` inside a frame (the Genex game page, or any other page
|
|
806
|
+
* that embeds the game), `app` inside the Genex mobile app, `local` on a dev
|
|
807
|
+
* server in local test mode, `standalone` on the game's own address in a
|
|
808
|
+
* browser tab (and anywhere that is not a browser at all).
|
|
809
|
+
*
|
|
810
|
+
* `app` is read off the WebView itself: a top-level page with a
|
|
811
|
+
* `window.ReactNativeWebView` bridge, whether or not the address carries the
|
|
812
|
+
* app's entry marker. The app also opens games on an address without one, and
|
|
813
|
+
* what a game may do in that WebView (no new window, no download, no leaving
|
|
814
|
+
* the game) is the same either way. So the answer is `app` in any React Native
|
|
815
|
+
* WebView, and it can be `app` while the game signs in the way a browser tab
|
|
816
|
+
* does: identity takes the native handshake only on both signals.
|
|
817
|
+
*
|
|
818
|
+
* A fact about the page, not about the player: who is signed in is
|
|
819
|
+
* getAuthState(), and nothing here is a permission.
|
|
820
|
+
*/
|
|
821
|
+
declare function getShell(): EmbedShell;
|
|
822
|
+
/**
|
|
823
|
+
* Run `cb` when the shell is taking the page away: the browser's `pagehide`
|
|
824
|
+
* (the tab closed, reloaded or navigated away) and the mobile app's `cancel`.
|
|
825
|
+
* The moment for a last savePlayerState(). On the browser's `pagehide` a small
|
|
826
|
+
* save still lands (fetch keepalive). The app takes its WebView away a moment
|
|
827
|
+
* after `cancel`, and a save started there is not known to finish first.
|
|
828
|
+
* Called once per closing; a page the browser brings back from its
|
|
829
|
+
* back/forward cache can close again. Returns an unsubscribe function.
|
|
830
|
+
*
|
|
831
|
+
* The last chance to save, not the only one: a phone can drop a backgrounded
|
|
832
|
+
* tab without telling the page, so save as the game goes. `cb` cannot keep the
|
|
833
|
+
* page open and cannot ask the player anything.
|
|
834
|
+
*/
|
|
835
|
+
declare function onShellClosing(cb: () => void): () => void;
|
|
599
836
|
/**
|
|
600
837
|
* Current auth state. Synchronous; starts 'pending', ends 'authenticated',
|
|
601
838
|
* 'guest' (accountless guest play) or 'blocked'. A 'guest' session may still
|
|
@@ -673,8 +910,12 @@ declare function on(event: EmbedEvent, cb: (ctx?: EventContext) => void): () =>
|
|
|
673
910
|
declare function loadPlayerState(): Promise<PlayerStateResult>;
|
|
674
911
|
/**
|
|
675
912
|
* Save THIS player's own slot (any JSON ≤ 256KB; last-write-wins on their own
|
|
676
|
-
* row). Guests:
|
|
677
|
-
*
|
|
913
|
+
* row). Guests: nothing is saved. The value is held in memory for this page
|
|
914
|
+
* load ({ saved: false, guest: true, queued: true }) and flushed only if an
|
|
915
|
+
* account arrives without a reload. No Genex shell does that today (signing in
|
|
916
|
+
* loads the game again), so a game that wants a guest's progress to survive
|
|
917
|
+
* keeps its own copy and starts from it, saving it, when the account loads
|
|
918
|
+
* with no save of its own.
|
|
678
919
|
* On the preview channel: { saved: false, staging: true }, nothing queued
|
|
679
920
|
* (nothing would ever flush it) and no `error` event — keep it in localStorage.
|
|
680
921
|
* Pass { ifVersion } (from the last load/save) to detect same-account
|
|
@@ -710,8 +951,9 @@ declare function saveWorldState(data: unknown, opts?: {
|
|
|
710
951
|
* Submit a score (soft-trust leaderboards: identity is verified server-side,
|
|
711
952
|
* one row per real player per board). Keep-best: only a strictly better score
|
|
712
953
|
* moves the row — `mode: "min"` for lap-time-style boards (send a consistent
|
|
713
|
-
* mode per board). Guests:
|
|
714
|
-
*
|
|
954
|
+
* mode per board). Guests: nothing is posted. The BEST value per board is
|
|
955
|
+
* held in memory for this page load and submitted only if an account arrives
|
|
956
|
+
* without a reload, which no Genex shell does today.
|
|
715
957
|
*/
|
|
716
958
|
declare function submitScore(score: number, opts?: {
|
|
717
959
|
board?: string;
|
|
@@ -794,7 +1036,8 @@ declare function listEvents<T = unknown>(stream: string, opts?: {
|
|
|
794
1036
|
* @internal — for ./sentry.ts ONLY, not public API (games never call this).
|
|
795
1037
|
* If the URL fragment carries any genex marker (`genex_ticket` — a secret —
|
|
796
1038
|
* or the inert `genex_guest`), move it out of the URL (so no recorder/logger
|
|
797
|
-
* ever sees it) into a stash the standalone flow reads.
|
|
1039
|
+
* ever sees it) into a stash the standalone flow reads. The game's own
|
|
1040
|
+
* fragment, carried inside it, goes back into the URL in the same step.
|
|
798
1041
|
*/
|
|
799
1042
|
declare function _stashTicketFromUrl(): void;
|
|
800
1043
|
declare function __resetForTests(overrides?: {
|
|
@@ -805,6 +1048,8 @@ declare function __resetForTests(overrides?: {
|
|
|
805
1048
|
overlayTextDelayMs?: number;
|
|
806
1049
|
nativeReauthTimeoutMs?: number;
|
|
807
1050
|
heartbeatIntervalMs?: number;
|
|
1051
|
+
platformReplyTimeoutMs?: number;
|
|
1052
|
+
platformConfirmTimeoutMs?: number;
|
|
808
1053
|
}): void;
|
|
809
1054
|
|
|
810
|
-
export { type AppendEventResult, type AuthState, type DeleteSharedResult, type EmbedConfig, type EmbedEvent, type EmbedUser, type Entitlement, type GenerateOptions, type GenerateStreamOptions, type JudgeOptions, type JudgeResult, type Leaderboard, type LeaderboardEntry, type PlayerStateResult, type PurchaseResult, type PurchaseStatus, type PutSharedResult, type RequestWorkflowOptions, RuntimeGenerationBilling, RuntimeGenerationFunding, RuntimeGenerationModels, type RuntimeGenerationResult, RuntimeGenerationView, RuntimeGrantView, RuntimeJudgeAnswer, RuntimeJudgeQuestion, RuntimeJudgmentView, type RuntimeWorkflowAuthorization, RuntimeWorkflowInput, RuntimeWorkflowOfferings, type SaveStateResult, type SharedEventPage, type SharedEventRecord, type SharedObject, type SharedObjectInfo, type SharedPage, type ShopItem, type SpendGrantDisclosure, type SpendGrantOptions, type SpendGrantResult, type SubmitScoreResult, type WorldStateResult, __resetForTests, _stashTicketFromUrl, appendEvent, buy, consumeEntitlement, deleteShared, generate, generateStream, generationErrorMessage, getActiveSpendGrant, getAuthState, getColyseusAuth, getColyseusUrls, getEmbedToken, getEntitlements, getGeneration, getGenerationModels, getLeaderboard, getShared, getShop, getSpendGrant, getUser, getWorkflowOfferings, initEmbed, isEmbedded, judge, listEvents, listShared, loadPlayerState, loadWorldState, on, putShared, requestSpendGrant, requestWorkflow, resumeWorkflow, savePlayerState, saveWorldState, stopSpendGrant, submitScore, waitForAuth, waitForGeneration, waitForPlayer };
|
|
1055
|
+
export { type AppendEventResult, type AuthState, type DeleteSharedResult, type EmbedConfig, type EmbedEntry, type EmbedEvent, type EmbedShell, type EmbedUser, type Entitlement, type GenerateOptions, type GenerateStreamOptions, type HapticKind, type JudgeOptions, type JudgeResult, type Leaderboard, type LeaderboardEntry, type PlatformError, type PlatformFeature, type PlatformOutcome, type PlayerStateResult, type PurchaseResult, type PurchaseStatus, type PutSharedResult, type RequestWorkflowOptions, RuntimeGenerationBilling, RuntimeGenerationFunding, RuntimeGenerationModels, type RuntimeGenerationResult, RuntimeGenerationView, RuntimeGrantView, RuntimeJudgeAnswer, RuntimeJudgeQuestion, RuntimeJudgmentView, type RuntimeWorkflowAuthorization, RuntimeWorkflowInput, RuntimeWorkflowOfferings, type SaveStateResult, type ShareOptions, type ShareResult, type SharedEventPage, type SharedEventRecord, type SharedObject, type SharedObjectInfo, type SharedPage, type ShopItem, type SpendGrantDisclosure, type SpendGrantOptions, type SpendGrantResult, type SubmitScoreResult, type WorldStateResult, __resetForTests, _stashTicketFromUrl, appendEvent, buy, consumeEntitlement, copyText, deleteShared, generate, generateStream, generationErrorMessage, getActiveSpendGrant, getAuthState, getColyseusAuth, getColyseusUrls, getEmbedToken, getEntitlements, getEntry, getGeneration, getGenerationModels, getLeaderboard, getShared, getShell, getShop, getSpendGrant, getUser, getWorkflowOfferings, haptic, initEmbed, isEmbedded, judge, keepAwake, listEvents, listShared, loadPlayerState, loadWorldState, on, onShellClosing, openExternal, putShared, requestSpendGrant, requestWorkflow, resumeWorkflow, saveFile, savePlayerState, saveWorldState, setFullscreen, share, stopSpendGrant, submitScore, supports, waitForAuth, waitForGeneration, waitForPlayer };
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
appendEvent,
|
|
5
5
|
buy,
|
|
6
6
|
consumeEntitlement,
|
|
7
|
+
copyText,
|
|
7
8
|
deleteShared,
|
|
8
9
|
generate,
|
|
9
10
|
generateStream,
|
|
@@ -14,41 +15,52 @@ import {
|
|
|
14
15
|
getColyseusUrls,
|
|
15
16
|
getEmbedToken,
|
|
16
17
|
getEntitlements,
|
|
18
|
+
getEntry,
|
|
17
19
|
getGeneration,
|
|
18
20
|
getGenerationModels,
|
|
19
21
|
getLeaderboard,
|
|
20
22
|
getShared,
|
|
23
|
+
getShell,
|
|
21
24
|
getShop,
|
|
22
25
|
getSpendGrant,
|
|
23
26
|
getUser,
|
|
24
27
|
getWorkflowOfferings,
|
|
28
|
+
haptic,
|
|
25
29
|
initEmbed,
|
|
26
30
|
isEmbedded,
|
|
27
31
|
judge,
|
|
32
|
+
keepAwake,
|
|
28
33
|
listEvents,
|
|
29
34
|
listShared,
|
|
30
35
|
loadPlayerState,
|
|
31
36
|
loadWorldState,
|
|
32
37
|
on,
|
|
38
|
+
onShellClosing,
|
|
39
|
+
openExternal,
|
|
33
40
|
putShared,
|
|
34
41
|
requestSpendGrant,
|
|
35
42
|
requestWorkflow,
|
|
36
43
|
resumeWorkflow,
|
|
44
|
+
saveFile,
|
|
37
45
|
savePlayerState,
|
|
38
46
|
saveWorldState,
|
|
47
|
+
setFullscreen,
|
|
48
|
+
share,
|
|
39
49
|
stopSpendGrant,
|
|
40
50
|
submitScore,
|
|
51
|
+
supports,
|
|
41
52
|
waitForAuth,
|
|
42
53
|
waitForGeneration,
|
|
43
54
|
waitForPlayer
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
55
|
+
} from "./chunk-NBCL5P5V.js";
|
|
56
|
+
import "./chunk-QBCWKMVQ.js";
|
|
46
57
|
export {
|
|
47
58
|
__resetForTests,
|
|
48
59
|
_stashTicketFromUrl,
|
|
49
60
|
appendEvent,
|
|
50
61
|
buy,
|
|
51
62
|
consumeEntitlement,
|
|
63
|
+
copyText,
|
|
52
64
|
deleteShared,
|
|
53
65
|
generate,
|
|
54
66
|
generateStream,
|
|
@@ -59,30 +71,40 @@ export {
|
|
|
59
71
|
getColyseusUrls,
|
|
60
72
|
getEmbedToken,
|
|
61
73
|
getEntitlements,
|
|
74
|
+
getEntry,
|
|
62
75
|
getGeneration,
|
|
63
76
|
getGenerationModels,
|
|
64
77
|
getLeaderboard,
|
|
65
78
|
getShared,
|
|
79
|
+
getShell,
|
|
66
80
|
getShop,
|
|
67
81
|
getSpendGrant,
|
|
68
82
|
getUser,
|
|
69
83
|
getWorkflowOfferings,
|
|
84
|
+
haptic,
|
|
70
85
|
initEmbed,
|
|
71
86
|
isEmbedded,
|
|
72
87
|
judge,
|
|
88
|
+
keepAwake,
|
|
73
89
|
listEvents,
|
|
74
90
|
listShared,
|
|
75
91
|
loadPlayerState,
|
|
76
92
|
loadWorldState,
|
|
77
93
|
on,
|
|
94
|
+
onShellClosing,
|
|
95
|
+
openExternal,
|
|
78
96
|
putShared,
|
|
79
97
|
requestSpendGrant,
|
|
80
98
|
requestWorkflow,
|
|
81
99
|
resumeWorkflow,
|
|
100
|
+
saveFile,
|
|
82
101
|
savePlayerState,
|
|
83
102
|
saveWorldState,
|
|
103
|
+
setFullscreen,
|
|
104
|
+
share,
|
|
84
105
|
stopSpendGrant,
|
|
85
106
|
submitScore,
|
|
107
|
+
supports,
|
|
86
108
|
waitForAuth,
|
|
87
109
|
waitForGeneration,
|
|
88
110
|
waitForPlayer
|
package/dist/sentry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genex-ai/embed-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Player identity + durable game state for genex games \u2014 signed-in or guest play, per-player save slots, shared world state, soft-trust leaderboards, and shared collections and event streams.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|