@corbado/observe 0.16.0 → 0.16.1

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/dist/index.d.mts CHANGED
@@ -2203,13 +2203,46 @@ declare class EventStore<T = Event> {
2203
2203
  size(): number;
2204
2204
  }
2205
2205
 
2206
- /** Sanitizes publicKey creation options (native values, JSON object, or JSON string). */
2206
+ /**
2207
+ * Serializes WebAuthn creation options, removing `user.name` and `user.displayName`.
2208
+ * Binary values become base64url strings. Other fields remain, including user IDs and challenges.
2209
+ *
2210
+ * @param value - Native publicKey options, a JSON object, or JSON text; not an application envelope.
2211
+ * @returns JSON text, or undefined for malformed or unserializable input.
2212
+ * @remarks Does not mutate input, read blacklisted getters, or call toJSON. No tracker initialization is required.
2213
+ * @example
2214
+ * ```ts
2215
+ * import { sanitizeCreationOptions } from "@corbado/observe";
2216
+ * const optionsJson = sanitizeCreationOptions({ user: { id: "user-id", name: "private" } });
2217
+ * ```
2218
+ */
2207
2219
  declare function sanitizeCreationOptions(value: unknown): string | undefined;
2208
- /** Sanitizes a registration credential; keeps attestation material but removes PRF results. */
2220
+ /**
2221
+ * Serializes a registration credential, removing `clientExtensionResults.prf.results`.
2222
+ * Other fields remain, including attestation material and credential IDs. Binary values become base64url strings.
2223
+ *
2224
+ * @param value - A native registration credential, JSON object, or JSON text; not an application envelope.
2225
+ * @returns JSON text, or undefined for malformed or unserializable input.
2226
+ * @remarks Does not mutate input, read blacklisted getters, or call toJSON. Encoded attestation and client-data blobs are not decoded or redacted.
2227
+ */
2209
2228
  declare function sanitizeCreationResponse(value: unknown): string | undefined;
2210
- /** Serializes publicKey authentication options. No fields are currently blacklisted. */
2229
+ /**
2230
+ * Serializes WebAuthn authentication options. No fields are currently blacklisted;
2231
+ * challenges, credential IDs, and extension inputs remain. Binary values become base64url strings.
2232
+ *
2233
+ * @param value - Native publicKey options, a JSON object, or JSON text; not an application envelope.
2234
+ * @returns JSON text, or undefined for malformed or unserializable input.
2235
+ * @remarks Does not mutate input or call toJSON. No tracker initialization is required.
2236
+ */
2211
2237
  declare function sanitizeRequestOptions(value: unknown): string | undefined;
2212
- /** Sanitizes an authentication credential; removes its login signature and PRF results. */
2238
+ /**
2239
+ * Serializes an authentication credential, removing `response.signature` and `clientExtensionResults.prf.results`.
2240
+ * Other fields remain, including credential IDs and user handles. Binary values become base64url strings.
2241
+ *
2242
+ * @param value - A native authentication credential, JSON object, or JSON text; not an application envelope.
2243
+ * @returns JSON text, or undefined for malformed or unserializable input.
2244
+ * @remarks Does not mutate input, read blacklisted getters, or call toJSON. This is a path blacklist, not general-purpose secret detection; encoded client-data blobs are not decoded or redacted.
2245
+ */
2213
2246
  declare function sanitizeAssertionResponse(value: unknown): string | undefined;
2214
2247
 
2215
2248
  /**
package/dist/index.d.ts CHANGED
@@ -2203,13 +2203,46 @@ declare class EventStore<T = Event> {
2203
2203
  size(): number;
2204
2204
  }
2205
2205
 
2206
- /** Sanitizes publicKey creation options (native values, JSON object, or JSON string). */
2206
+ /**
2207
+ * Serializes WebAuthn creation options, removing `user.name` and `user.displayName`.
2208
+ * Binary values become base64url strings. Other fields remain, including user IDs and challenges.
2209
+ *
2210
+ * @param value - Native publicKey options, a JSON object, or JSON text; not an application envelope.
2211
+ * @returns JSON text, or undefined for malformed or unserializable input.
2212
+ * @remarks Does not mutate input, read blacklisted getters, or call toJSON. No tracker initialization is required.
2213
+ * @example
2214
+ * ```ts
2215
+ * import { sanitizeCreationOptions } from "@corbado/observe";
2216
+ * const optionsJson = sanitizeCreationOptions({ user: { id: "user-id", name: "private" } });
2217
+ * ```
2218
+ */
2207
2219
  declare function sanitizeCreationOptions(value: unknown): string | undefined;
2208
- /** Sanitizes a registration credential; keeps attestation material but removes PRF results. */
2220
+ /**
2221
+ * Serializes a registration credential, removing `clientExtensionResults.prf.results`.
2222
+ * Other fields remain, including attestation material and credential IDs. Binary values become base64url strings.
2223
+ *
2224
+ * @param value - A native registration credential, JSON object, or JSON text; not an application envelope.
2225
+ * @returns JSON text, or undefined for malformed or unserializable input.
2226
+ * @remarks Does not mutate input, read blacklisted getters, or call toJSON. Encoded attestation and client-data blobs are not decoded or redacted.
2227
+ */
2209
2228
  declare function sanitizeCreationResponse(value: unknown): string | undefined;
2210
- /** Serializes publicKey authentication options. No fields are currently blacklisted. */
2229
+ /**
2230
+ * Serializes WebAuthn authentication options. No fields are currently blacklisted;
2231
+ * challenges, credential IDs, and extension inputs remain. Binary values become base64url strings.
2232
+ *
2233
+ * @param value - Native publicKey options, a JSON object, or JSON text; not an application envelope.
2234
+ * @returns JSON text, or undefined for malformed or unserializable input.
2235
+ * @remarks Does not mutate input or call toJSON. No tracker initialization is required.
2236
+ */
2211
2237
  declare function sanitizeRequestOptions(value: unknown): string | undefined;
2212
- /** Sanitizes an authentication credential; removes its login signature and PRF results. */
2238
+ /**
2239
+ * Serializes an authentication credential, removing `response.signature` and `clientExtensionResults.prf.results`.
2240
+ * Other fields remain, including credential IDs and user handles. Binary values become base64url strings.
2241
+ *
2242
+ * @param value - A native authentication credential, JSON object, or JSON text; not an application envelope.
2243
+ * @returns JSON text, or undefined for malformed or unserializable input.
2244
+ * @remarks Does not mutate input, read blacklisted getters, or call toJSON. This is a path blacklist, not general-purpose secret detection; encoded client-data blobs are not decoded or redacted.
2245
+ */
2213
2246
  declare function sanitizeAssertionResponse(value: unknown): string | undefined;
2214
2247
 
2215
2248
  /**