@dogeos/dogeos-sdk 4.0.4-beta.1 → 4.0.5-beta.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +10 -0
  2. package/dist/index.js +20218 -20066
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -34,6 +34,14 @@ declare type AuthClientState = {
34
34
 
35
35
  declare type AuthErrorCode = "invalid_client" | "unsupported_protocol" | "invalid_delivery" | "provider_cancelled" | "provider_rejected" | "invalid_state" | "flow_interrupted" | "flow_expired" | "email_address_invalid" | "email_code_invalid" | "email_challenge_expired" | "email_challenge_exhausted" | "email_delivery_unavailable" | "attestation_enrollment_required" | "attestation_challenge_expired" | "attestation_rejected" | "handoff_replayed" | "proof_required" | "assurance_required" | "session_revoked" | "reauthentication_required" | "cleanup_required" | "wallet_mfa_dependency_unavailable" | "rate_limited" | "temporarily_unavailable";
36
36
 
37
+ /**
38
+ * Why a client refused a request locally, for the cases a caller can act on.
39
+ * `session_changed`: this client's session generation moved on while the
40
+ * request was in flight. `lifecycle_changed`: a client wrapping this one saw
41
+ * its own session lifecycle move on, for example through a cross-tab signal.
42
+ */
43
+ declare type AuthErrorReason = "session_changed" | "lifecycle_changed";
44
+
37
45
  declare type AuthErrorResponse = {
38
46
  code: AuthErrorCode;
39
47
  message: string;
@@ -155,10 +163,12 @@ declare type CreateEmailFlowOptions = {
155
163
  declare class DogeOSAuthError extends Error {
156
164
  readonly code: AuthErrorCode;
157
165
  readonly correlationId: string | null;
166
+ readonly reason: AuthErrorReason | null;
158
167
  constructor(args: {
159
168
  code: AuthErrorCode;
160
169
  message: string;
161
170
  correlationId?: string | null;
171
+ reason?: AuthErrorReason;
162
172
  });
163
173
  }
164
174