swell-js 5.9.2 → 5.9.3

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.
@@ -1,5 +1,5 @@
1
1
  export { f as find, P as findIndex, g as get, Q as stringifyQuery, t as toNumber } from '../find.ba551a2e.mjs';
2
- export { o as base64Encode, f as camelCase, c as cloneDeep, d as defaultMethods, q as getLocationParams, k as isEmpty, h as isEqual, j as isFunction, n as isLiveMode, e as isObject, i as isServer, l as loadScript, C as map, m as merge, p as pick, r as reduce, w as removeUrlParams, s as set, g as snakeCase, t as toCamel, a as toCamelPath, B as toLower, b as toSnake, A as trimBoth, x as trimEnd, z as trimStart, u as uniq, v as vaultRequest } from '../index.3949a230.mjs';
2
+ export { o as base64Encode, f as camelCase, c as cloneDeep, d as defaultMethods, q as getLocationParams, k as isEmpty, h as isEqual, j as isFunction, n as isLiveMode, e as isObject, i as isServer, l as loadScript, C as map, m as merge, p as pick, r as reduce, w as removeUrlParams, s as set, g as snakeCase, t as toCamel, a as toCamelPath, B as toLower, b as toSnake, A as trimBoth, x as trimEnd, z as trimStart, u as uniq, v as vaultRequest } from '../index.76eb52e5.mjs';
3
3
  export { r as round } from '../round.c68b8be5.mjs';
4
4
  import 'deepmerge';
5
5
  import 'fast-case';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swell-js",
3
- "version": "5.9.2",
3
+ "version": "5.9.3",
4
4
  "description": "Swell JS library for client-side stores",
5
5
  "engines": {
6
6
  "node": ">=16"
package/types/index.d.ts CHANGED
@@ -127,6 +127,13 @@ export interface InitOptions<C extends 'snake' | 'camel' = 'snake'> {
127
127
  * and payment integrations such as Google Pay and Apple Pay.
128
128
  */
129
129
  updateCart?: (input: object) => Promise<CartCase[C] | null>;
130
+ /**
131
+ * Returns a captcha token to attach to create-intent requests. The host
132
+ * owns the captcha widget and the token's lifecycle; swell-js only forwards
133
+ * the resolved token. Reject (or throw) to abort the intent, e.g. when the
134
+ * challenge times out or fails.
135
+ */
136
+ getCaptchaToken?: () => Promise<string | null | undefined>;
130
137
  }
131
138
 
132
139
  export interface InitOptionsCamel extends InitOptions<'camel'> {