@jest-com/types 1.260922.11 → 1.260923.7

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.
Files changed (2) hide show
  1. package/index.d.ts +29 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -553,6 +553,33 @@ export interface SocialModule {
553
553
  size?: AvatarSize;
554
554
  username: string;
555
555
  }): string;
556
+ /**
557
+ * Opens the platform's share sheet for an image — the same sheet the
558
+ * platform's own screenshot button shows, offering chat, the native share
559
+ * sheet and download. The player picks where it goes and writes the
560
+ * caption, so a game can never share on the player's behalf without a tap.
561
+ *
562
+ * @param options.image - Base64 PNG (raw or data URL). Omit it to have the
563
+ * platform capture the canvas, or your registered screenshot provider.
564
+ * @param options.entryPayload - Handed back to your game when a player
565
+ * opens the shared message, so a code or coupon travels with it.
566
+ * @returns `{ canceled: true }` when the sheet closed without sharing,
567
+ * including a player who left the page while the post was still landing,
568
+ * so it is not proof that nothing was posted.
569
+ * @example
570
+ * ```typescript
571
+ * await JestSDK.social.shareImage({
572
+ * image: couponCanvas.toDataURL("image/png"),
573
+ * entryPayload: { coupon: "SPRING25" },
574
+ * });
575
+ * ```
576
+ */
577
+ shareImage(options?: {
578
+ image?: string;
579
+ entryPayload?: Record<string, unknown>;
580
+ }): Promise<{
581
+ canceled: boolean;
582
+ }>;
556
583
  /**
557
584
  * Registers a custom screenshot source used when the platform asks the
558
585
  * game for a screenshot, replacing the SDK's automatic canvas capture.
@@ -1137,7 +1164,8 @@ export interface JestSDK {
1137
1164
  /**
1138
1165
  * Records a custom analytics event for the current player.
1139
1166
  *
1140
- * Retired from the docs; still delivered for games that call it.
1167
+ * Retired from the docs. Delivered only for onboardings and games granted
1168
+ * the `custom_analytics` entitlement; a no-op everywhere else.
1141
1169
  *
1142
1170
  * @hidden
1143
1171
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jest-com/types",
3
- "version": "1.260922.11",
3
+ "version": "1.260923.7",
4
4
  "description": "TypeScript types for the Jest HTML5 game SDK global (window.JestSDK).",
5
5
  "keywords": [
6
6
  "jest",