@cimplify/sdk 0.16.1 → 0.16.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.
- package/dist/advanced.d.mts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +106 -232
- package/dist/advanced.mjs +106 -232
- package/dist/{client-wOQ8P1Ks.d.mts → client-BaolRdB4.d.mts} +4 -3
- package/dist/{client-NdvQpCxU.d.ts → client-C59R79gx.d.ts} +4 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +110 -235
- package/dist/index.mjs +110 -235
- package/dist/{payment-Dvd7nRmk.d.mts → payment-C6ULw3K-.d.mts} +1 -1
- package/dist/{payment-Dvd7nRmk.d.ts → payment-C6ULw3K-.d.ts} +1 -1
- package/dist/{price-DrfhwHpw.d.ts → price-Bd6JBV8W.d.ts} +1 -1
- package/dist/{price-BDZNXiLS.d.mts → price-CbR6DCt0.d.mts} +1 -1
- package/dist/react.d.mts +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +106 -232
- package/dist/react.mjs +106 -232
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +4 -3
- package/dist/utils.mjs +4 -3
- package/package.json +1 -1
package/dist/utils.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Money, C as CurrencyCode, aB as PricePathTaxInfo, bm as PaymentErrorDetails, bk as PaymentResponse, bl as PaymentStatusResponse } from './payment-
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
1
|
+
import { M as Money, C as CurrencyCode, aB as PricePathTaxInfo, bm as PaymentErrorDetails, bk as PaymentResponse, bl as PaymentStatusResponse } from './payment-C6ULw3K-.mjs';
|
|
2
|
+
import { P as ProductWithPrice } from './price-CbR6DCt0.mjs';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
4
|
|
|
5
5
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Money, C as CurrencyCode, aB as PricePathTaxInfo, bm as PaymentErrorDetails, bk as PaymentResponse, bl as PaymentStatusResponse } from './payment-
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
1
|
+
import { M as Money, C as CurrencyCode, aB as PricePathTaxInfo, bm as PaymentErrorDetails, bk as PaymentResponse, bl as PaymentStatusResponse } from './payment-C6ULw3K-.js';
|
|
2
|
+
import { P as ProductWithPrice } from './price-Bd6JBV8W.js';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
4
|
|
|
5
5
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|
package/dist/utils.js
CHANGED
|
@@ -361,9 +361,10 @@ function normalizePaymentResponse(response) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
if (isWebPaymentResponse(response)) {
|
|
364
|
-
const
|
|
365
|
-
const
|
|
366
|
-
const
|
|
364
|
+
const objectAuthType = response.authorization_type && typeof response.authorization_type === "object" && "address" in response.authorization_type ? "address" : void 0;
|
|
365
|
+
const authType = typeof response.authorization_type === "string" ? response.authorization_type.trim().toLowerCase().replace(/[\s-]+/g, "_") : void 0;
|
|
366
|
+
const validStringAuthTypes = ["otp", "pin", "phone", "birthday", "address"];
|
|
367
|
+
const safeAuthType = objectAuthType || (authType && validStringAuthTypes.includes(authType) ? authType : void 0);
|
|
367
368
|
return {
|
|
368
369
|
provider: response.transaction.provider_type?.toLowerCase() || "unknown",
|
|
369
370
|
requires_action: response.requires_action || false,
|
package/dist/utils.mjs
CHANGED
|
@@ -359,9 +359,10 @@ function normalizePaymentResponse(response) {
|
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
if (isWebPaymentResponse(response)) {
|
|
362
|
-
const
|
|
363
|
-
const
|
|
364
|
-
const
|
|
362
|
+
const objectAuthType = response.authorization_type && typeof response.authorization_type === "object" && "address" in response.authorization_type ? "address" : void 0;
|
|
363
|
+
const authType = typeof response.authorization_type === "string" ? response.authorization_type.trim().toLowerCase().replace(/[\s-]+/g, "_") : void 0;
|
|
364
|
+
const validStringAuthTypes = ["otp", "pin", "phone", "birthday", "address"];
|
|
365
|
+
const safeAuthType = objectAuthType || (authType && validStringAuthTypes.includes(authType) ? authType : void 0);
|
|
365
366
|
return {
|
|
366
367
|
provider: response.transaction.provider_type?.toLowerCase() || "unknown",
|
|
367
368
|
requires_action: response.requires_action || false,
|