@invonetwork/web-sdk 3.30.3 → 3.31.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.
@@ -31,6 +31,11 @@ declare class InvoError extends Error {
31
31
  readonly body: unknown;
32
32
  /** Backend request id (from the response headers), when present — quote it in support tickets. */
33
33
  readonly requestId: string | undefined;
34
+ /**
35
+ * The response's `Retry-After` header, as sent (additive, 3.31.0). Read {@link retryAfter}
36
+ * rather than this: it prefers the body's `retry_after` and falls back to this header.
37
+ */
38
+ readonly retryAfterHeader: string | undefined;
34
39
  constructor(args: {
35
40
  message: string;
36
41
  code?: string;
@@ -39,6 +44,7 @@ declare class InvoError extends Error {
39
44
  status: number;
40
45
  body?: unknown;
41
46
  requestId?: string;
47
+ retryAfterHeader?: string;
42
48
  });
43
49
  /** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
44
50
  get isReceiverNotEnrolled(): boolean;
@@ -822,8 +828,19 @@ declare class InvoError extends Error {
822
828
  get isRewardUnavailable(): boolean;
823
829
  /** True when the reward expired before it was redeemed (`vault_entry_expired`, 410). */
824
830
  get isRewardExpired(): boolean;
825
- /** Seconds to wait before retrying, when the backend throttled the call (429 `retry_after`). */
831
+ /**
832
+ * Seconds to wait before retrying, when the backend throttled the call: the body's
833
+ * `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
834
+ * both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
835
+ */
826
836
  get retryAfter(): number | undefined;
837
+ /**
838
+ * True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
839
+ * `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
840
+ * older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
841
+ * and send the same request again. Branch on this, not on the message.
842
+ */
843
+ get isRateLimited(): boolean;
827
844
  /** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
828
845
  * The `in` operator throws on primitives, so callers must go through this. */
829
846
  private bodyObject;
@@ -1223,7 +1240,10 @@ interface CreateCheckoutInput {
1223
1240
  * pinned here: expect a 400 carrying the live figure. */
1224
1241
  usdAmount: string | number;
1225
1242
  /** Which rail the hosted page presents. Default "platform" (card). The page
1226
- * renders the right experience per rail — all branded as INVO. */
1243
+ * renders the right experience per rail. On every rail it shows the INVO logo by
1244
+ * default, or the game's own logo when one is set in the INVO console (Game
1245
+ * settings, Checkout branding), with a "Secured by INVO" line at the bottom.
1246
+ * There is no SDK call to set the logo. */
1227
1247
  rail?: Rail;
1228
1248
  successUrl?: string;
1229
1249
  cancelUrl?: string;
@@ -1908,6 +1928,19 @@ interface PlatformOrderStatusResult {
1908
1928
  * `receiptNumber` is.
1909
1929
  */
1910
1930
  receiptUrl?: string;
1931
+ /**
1932
+ * Additive (2026-10-20): everything INVO kept on this sale, in USD, as a decimal string such
1933
+ * as `"0.50"`: the price less tax less {@link partnerShareUsd} (the card fee, and the
1934
+ * international card fee where it applies, on a card sale; the platform fee on a balance sale).
1935
+ * `null` until the sale has settled, or when the split cannot be read; `undefined` from an
1936
+ * INVO release that does not send it. A later refund or lost dispute does not change it.
1937
+ */
1938
+ invoFeeUsd?: string | null;
1939
+ /**
1940
+ * Additive (2026-10-20): what you earned on this sale, in USD, as a decimal string. `null` and
1941
+ * `undefined` on the same terms as {@link invoFeeUsd}.
1942
+ */
1943
+ partnerShareUsd?: string | null;
1911
1944
  raw: Record<string, unknown>;
1912
1945
  }
1913
1946
  /** Input to `platformCommerce.getPurchaseHistory`. */
@@ -2781,7 +2814,9 @@ interface FirstCharge {
2781
2814
  */
2782
2815
  failureCode: string | null;
2783
2816
  nextRetryAt: string | null;
2784
- /** On `requires_action`: a single-use bearer link. Do not log it beside identifiers you publish. */
2817
+ /** On `requires_action`: a single-use bearer link. Do not log it beside identifiers you publish.
2818
+ * The page it opens shows the INVO logo by default, or the game's own logo when one is
2819
+ * set in the INVO console (Game settings, Checkout branding). */
2785
2820
  confirmationUrl: string | null;
2786
2821
  expiresAt: string | null;
2787
2822
  message: string | null;
@@ -3314,7 +3349,9 @@ interface CardSetupSessionInput {
3314
3349
  */
3315
3350
  interface CardSetupSessionResult {
3316
3351
  sessionId: string;
3317
- /** The INVO-hosted card page for this member. Never build this URL yourself. */
3352
+ /** The INVO-hosted card page for this member. Never build this URL yourself. It
3353
+ * shows the INVO logo by default, or the game's own logo when one is set in the INVO
3354
+ * console (Game settings, Checkout branding). */
3318
3355
  cardSetupUrl: string;
3319
3356
  /** ISO 8601 with offset: 10 minutes after the mint. */
3320
3357
  expiresAt: string;
@@ -31,6 +31,11 @@ declare class InvoError extends Error {
31
31
  readonly body: unknown;
32
32
  /** Backend request id (from the response headers), when present — quote it in support tickets. */
33
33
  readonly requestId: string | undefined;
34
+ /**
35
+ * The response's `Retry-After` header, as sent (additive, 3.31.0). Read {@link retryAfter}
36
+ * rather than this: it prefers the body's `retry_after` and falls back to this header.
37
+ */
38
+ readonly retryAfterHeader: string | undefined;
34
39
  constructor(args: {
35
40
  message: string;
36
41
  code?: string;
@@ -39,6 +44,7 @@ declare class InvoError extends Error {
39
44
  status: number;
40
45
  body?: unknown;
41
46
  requestId?: string;
47
+ retryAfterHeader?: string;
42
48
  });
43
49
  /** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
44
50
  get isReceiverNotEnrolled(): boolean;
@@ -822,8 +828,19 @@ declare class InvoError extends Error {
822
828
  get isRewardUnavailable(): boolean;
823
829
  /** True when the reward expired before it was redeemed (`vault_entry_expired`, 410). */
824
830
  get isRewardExpired(): boolean;
825
- /** Seconds to wait before retrying, when the backend throttled the call (429 `retry_after`). */
831
+ /**
832
+ * Seconds to wait before retrying, when the backend throttled the call: the body's
833
+ * `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
834
+ * both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
835
+ */
826
836
  get retryAfter(): number | undefined;
837
+ /**
838
+ * True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
839
+ * `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
840
+ * older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
841
+ * and send the same request again. Branch on this, not on the message.
842
+ */
843
+ get isRateLimited(): boolean;
827
844
  /** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
828
845
  * The `in` operator throws on primitives, so callers must go through this. */
829
846
  private bodyObject;
@@ -1223,7 +1240,10 @@ interface CreateCheckoutInput {
1223
1240
  * pinned here: expect a 400 carrying the live figure. */
1224
1241
  usdAmount: string | number;
1225
1242
  /** Which rail the hosted page presents. Default "platform" (card). The page
1226
- * renders the right experience per rail — all branded as INVO. */
1243
+ * renders the right experience per rail. On every rail it shows the INVO logo by
1244
+ * default, or the game's own logo when one is set in the INVO console (Game
1245
+ * settings, Checkout branding), with a "Secured by INVO" line at the bottom.
1246
+ * There is no SDK call to set the logo. */
1227
1247
  rail?: Rail;
1228
1248
  successUrl?: string;
1229
1249
  cancelUrl?: string;
@@ -1908,6 +1928,19 @@ interface PlatformOrderStatusResult {
1908
1928
  * `receiptNumber` is.
1909
1929
  */
1910
1930
  receiptUrl?: string;
1931
+ /**
1932
+ * Additive (2026-10-20): everything INVO kept on this sale, in USD, as a decimal string such
1933
+ * as `"0.50"`: the price less tax less {@link partnerShareUsd} (the card fee, and the
1934
+ * international card fee where it applies, on a card sale; the platform fee on a balance sale).
1935
+ * `null` until the sale has settled, or when the split cannot be read; `undefined` from an
1936
+ * INVO release that does not send it. A later refund or lost dispute does not change it.
1937
+ */
1938
+ invoFeeUsd?: string | null;
1939
+ /**
1940
+ * Additive (2026-10-20): what you earned on this sale, in USD, as a decimal string. `null` and
1941
+ * `undefined` on the same terms as {@link invoFeeUsd}.
1942
+ */
1943
+ partnerShareUsd?: string | null;
1911
1944
  raw: Record<string, unknown>;
1912
1945
  }
1913
1946
  /** Input to `platformCommerce.getPurchaseHistory`. */
@@ -2781,7 +2814,9 @@ interface FirstCharge {
2781
2814
  */
2782
2815
  failureCode: string | null;
2783
2816
  nextRetryAt: string | null;
2784
- /** On `requires_action`: a single-use bearer link. Do not log it beside identifiers you publish. */
2817
+ /** On `requires_action`: a single-use bearer link. Do not log it beside identifiers you publish.
2818
+ * The page it opens shows the INVO logo by default, or the game's own logo when one is
2819
+ * set in the INVO console (Game settings, Checkout branding). */
2785
2820
  confirmationUrl: string | null;
2786
2821
  expiresAt: string | null;
2787
2822
  message: string | null;
@@ -3314,7 +3349,9 @@ interface CardSetupSessionInput {
3314
3349
  */
3315
3350
  interface CardSetupSessionResult {
3316
3351
  sessionId: string;
3317
- /** The INVO-hosted card page for this member. Never build this URL yourself. */
3352
+ /** The INVO-hosted card page for this member. Never build this URL yourself. It
3353
+ * shows the INVO logo by default, or the game's own logo when one is set in the INVO
3354
+ * console (Game settings, Checkout branding). */
3318
3355
  cardSetupUrl: string;
3319
3356
  /** ISO 8601 with offset: 10 minutes after the mint. */
3320
3357
  expiresAt: string;
@@ -3,6 +3,6 @@
3
3
  * `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
4
4
  * Bump it with the changeset flow.
5
5
  */
6
- declare const SDK_VERSION = "3.30.3";
6
+ declare const SDK_VERSION = "3.31.0";
7
7
 
8
8
  export { SDK_VERSION as S };
@@ -3,6 +3,6 @@
3
3
  * `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
4
4
  * Bump it with the changeset flow.
5
5
  */
6
- declare const SDK_VERSION = "3.30.3";
6
+ declare const SDK_VERSION = "3.31.0";
7
7
 
8
8
  export { SDK_VERSION as S };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invonetwork/web-sdk",
3
- "version": "3.30.3",
3
+ "version": "3.31.0",
4
4
  "description": "INVO Web SDK — currency purchase, passkey (WebAuthn) verification, loyalty, and a drop-in game economy layer (wallet, shop, hosted checkout) for partner web platforms and browser games.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "private": false,
@@ -1,6 +0,0 @@
1
- // src/version.ts
2
- var SDK_VERSION = "3.30.3";
3
-
4
- export { SDK_VERSION };
5
- //# sourceMappingURL=chunk-CSIEPFCV.js.map
6
- //# sourceMappingURL=chunk-CSIEPFCV.js.map