@pontive/pontkit-core 1.53.0 → 1.54.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.
@@ -12,6 +12,11 @@ export interface BillingProblem {
12
12
  message: string;
13
13
  /** Whether trying again could help. */
14
14
  retry: boolean;
15
+ /**
16
+ * Starting over cannot help either (a new checkout session): the app's own setup refused it
17
+ * (`invalid_scope` on the management token). `<pont-checkout>` offers no "Start again".
18
+ */
19
+ final?: boolean;
15
20
  /** For the app's developer, logged with `console.warn`. */
16
21
  hint?: string;
17
22
  }
@@ -69,7 +69,9 @@ export declare function escapeAttr(value: string): string;
69
69
  * (`continue_here`, handled by the SDK);
70
70
  * - "Start again" in the layout (`pont-layout-restart`), or `restart()`,
71
71
  * starts the flow over;
72
- * - a flow that fails to start shows the error in the layout, restartable.
72
+ * - a flow that fails to start shows the error in the layout, restartable unless
73
+ * starting again cannot help (`final`: a stopped instance, a scope the app does
74
+ * not allow).
73
75
  *
74
76
  * Until the first screen arrives it shows a spinner (`data-state="loading"`).
75
77
  *
@@ -13,6 +13,12 @@ export interface FlowErrorDescription {
13
13
  restartable: boolean;
14
14
  /** The instance has stopped: nothing will work, so offer nothing to retry. */
15
15
  unavailable?: boolean;
16
+ /**
17
+ * Starting again cannot help either: the instance has stopped (`unavailable`), or the app's own
18
+ * configuration refused it (`invalid_scope`). A flow widget whose start fails this way offers no
19
+ * "Start again".
20
+ */
21
+ final?: boolean;
16
22
  }
17
23
  /**
18
24
  * A stopped instance (paused, or its owner's Pontive account paused, cancelled or
@@ -39,8 +45,8 @@ export declare function isInstanceUnavailable(error: unknown): boolean;
39
45
  export declare function rememberUnavailable(sentence?: string): void;
40
46
  /**
41
47
  * - a cancelled or timed-out WebAuthn prompt (`NotAllowedError` / `AbortError`) → passkey_cancelled
42
- * - `instance_unavailable` → the refusal's own sentence, kept for the page (rememberUnavailable); not restartable
43
- * - `invalid_scope` (a flow start asking for a scope the app does not allow) → scope_not_allowed
48
+ * - `instance_unavailable` → the refusal's own sentence, kept for the page (rememberUnavailable); not restartable, final
49
+ * - `invalid_scope` (a flow start asking for a scope the app does not allow) → scope_not_allowed; final
44
50
  * - 409 → the code's message, else the server's sentence, else flow_ended; restartable
45
51
  * - no response at all (NETWORK_ERROR / TIMEOUT) → connection_failed
46
52
  * - 429 → too_many_attempts; ≥ 500 → server_error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pontive/pontkit-core",
3
- "version": "1.53.0",
3
+ "version": "1.54.0",
4
4
  "license": "MIT",
5
5
  "description": "A collection of core components for Pontive",
6
6
  "module": "dist/index.mjs",