@vpdev2/metakyc 1.0.49 → 1.0.51
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/README.md +44 -8
- package/dist/client/session.d.ts +6 -0
- package/dist/client/session.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -297,19 +297,19 @@ class Li {
|
|
|
297
297
|
}
|
|
298
298
|
class Aa {
|
|
299
299
|
static async createToken(t) {
|
|
300
|
-
const { baseUrl: a, apiKey: r, secretKey: n, tenantId: c, clientId: o } = t;
|
|
300
|
+
const { baseUrl: a, apiKey: r, secretKey: n, tenantId: c, clientId: o, externalRefId: g } = t;
|
|
301
301
|
if (!c && !o)
|
|
302
302
|
throw new Error("Either tenantId or clientId must be provided.");
|
|
303
|
-
const
|
|
304
|
-
c != null && (
|
|
305
|
-
const
|
|
303
|
+
const m = { apiKey: r, secretKey: n };
|
|
304
|
+
c != null && (m.tenantId = c), o && (m.clientId = o), g && (m.externalRefId = g);
|
|
305
|
+
const y = (await Xt.post(
|
|
306
306
|
`${a.replace(/\/+$/, "")}/api/SdkSession/CreateToken`,
|
|
307
|
-
|
|
307
|
+
m,
|
|
308
308
|
{ headers: { "Content-Type": "application/json" } }
|
|
309
309
|
)).data;
|
|
310
|
-
if (!
|
|
311
|
-
throw new Error(
|
|
312
|
-
return
|
|
310
|
+
if (!y.success)
|
|
311
|
+
throw new Error(y.error || "Failed to create session token.");
|
|
312
|
+
return y.result;
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
class Ei {
|
|
@@ -6811,7 +6811,7 @@ function G(e, t) {
|
|
|
6811
6811
|
const r = Sr.exec(a);
|
|
6812
6812
|
return r ? t(r[1]) : e;
|
|
6813
6813
|
}
|
|
6814
|
-
const ri = "1.0.
|
|
6814
|
+
const ri = "1.0.51", ai = Zt(null), qt = `metakyc-translations-${ri}-`, Cr = ({
|
|
6815
6815
|
locale: e,
|
|
6816
6816
|
fetchTranslations: t,
|
|
6817
6817
|
children: a
|